Commit 82a2dc2c authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

Merge branch 'feature-fix-library-option' into develop

parents 7be99af5 b0eb874f
......@@ -23,7 +23,7 @@
#! [NEEDS_XERCESC]
#! [NEEDS_XSD]
#! [NEEDS_QT]
#! [NEEDS_CAMITK]
#! [NEEDS_CAMITKCORE]
#! [DEFINES flag1 flag2 ...]
#! [EXTERNAL_LIBRARIES lib1 lib2... ]
#! [INCLUDE_DIRECTORIES dir1 dir2...]
......@@ -47,7 +47,7 @@
#! \param NEEDS_XERCESC add this if your action / component needs XercesC library
#! \param NEEDS_XSD add this if your action needs Codesynthesis xsd cxx (xml schema compiler)
#! \param NEEDS_QT add this if your library depends on Qt 5.x
#! \param NEEDS_CAMITK add this if your library depends on CamiTK
#! \param NEEDS_CAMITKCORE add this if your library depends on CamiTK
#! \param LIBNAME force the CEP library name to be different from the directory it is in
#! \param LINK_DIRECTORIES additional directories to use in link_directories(...)
#! \param DEFINES list of define flags to add at compilation time
......@@ -78,7 +78,7 @@ macro(camitk_library)
parse_arguments(${DEFAULT_LIBRARY_NAME_CMAKE}
"SOURCES;NEEDS_CEP_LIBRARIES;EXTERNAL_LIBRARIES;INCLUDE_DIRECTORIES;LIBNAME;DEFINES;LINK_DIRECTORIES;HEADERS_TO_INSTALL;CEP_NAME;DESCRIPTION;EXTRA_TRANSLATE_LANGUAGE;CXX_FLAGS" # possible lists
"SHARED;STATIC;NEEDS_CAMITK;NEEDS_ITK;NEEDS_LIBXML2;NEEDS_XERCESC;NEEDS_XSD;NEEDS_QT;PUBLIC" # possible options
"SHARED;STATIC;NEEDS_CAMITKCORE;NEEDS_ITK;NEEDS_LIBXML2;NEEDS_XERCESC;NEEDS_XSD;NEEDS_QT;PUBLIC" # possible options
${ARGN}
)
......@@ -339,7 +339,7 @@ macro(camitk_library)
# #
# QT LINKING LIBRARIES #
# #
# * Set at linking the Qt5 libraries #
# * Set linking modules for the Qt5 libraries #
# #
#########################################################################
if(${DEFAULT_LIBRARY_NAME_CMAKE}_NEEDS_QT)
......@@ -347,6 +347,17 @@ macro(camitk_library)
endif()
#########################################################################
# #
# CAMITK CORE LIBRARIES #
# #
# * If a library build on top of CamiTKCore add required dependencies #
# #
#########################################################################
# Check if camitk core is needed
if (${DEFAULT_LIBRARY_NAME_CMAKE}_NEEDS_CAMITKCORE)
set(CAMITK_LIBRARIES_DEPENDENCIES ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES})
endif()
#########################################################################
......@@ -403,11 +414,6 @@ macro(camitk_library)
# #
#########################################################################
# LINKING LIBRARIES
# Looking for CamiTK
if (${DEFAULT_LIBRARY_NAME_CMAKE}_NEEDS_CAMITK)
set(CAMITK_LIBRARIES_DEPENDENCIES ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES})
#target_link_libraries(${LIBRARY_TARGET_NAME} ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES})
endif()
target_link_libraries(${LIBRARY_TARGET_NAME} ${CAMITK_LIBRARIES_DEPENDENCIES} ${CEP_LIBRARIES} ${LINKER_EXTERNAL_LIBRARIES} ${LIBXML2_LIBRARY} ${CAMITK_ITK_LIBRARIES} ${XERCESC_LIBRARIES})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment