Commit 7be99af5 authored by Claire Sery's avatar Claire Sery
Browse files

UPDATED: Add an option to link a CamiTKLibrary to CamiTK.

TODO: Update it also in the Wizard.
parent 9aff0048
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#! [NEEDS_XERCESC] #! [NEEDS_XERCESC]
#! [NEEDS_XSD] #! [NEEDS_XSD]
#! [NEEDS_QT] #! [NEEDS_QT]
#! [NEEDS_CAMITK]
#! [DEFINES flag1 flag2 ...] #! [DEFINES flag1 flag2 ...]
#! [EXTERNAL_LIBRARIES lib1 lib2... ] #! [EXTERNAL_LIBRARIES lib1 lib2... ]
#! [INCLUDE_DIRECTORIES dir1 dir2...] #! [INCLUDE_DIRECTORIES dir1 dir2...]
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
#! \param NEEDS_XERCESC add this if your action / component needs XercesC library #! \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_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_QT add this if your library depends on Qt 5.x
#! \param NEEDS_CAMITK 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 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 LINK_DIRECTORIES additional directories to use in link_directories(...)
#! \param DEFINES list of define flags to add at compilation time #! \param DEFINES list of define flags to add at compilation time
...@@ -76,7 +78,7 @@ macro(camitk_library) ...@@ -76,7 +78,7 @@ macro(camitk_library)
parse_arguments(${DEFAULT_LIBRARY_NAME_CMAKE} 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 "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_ITK;NEEDS_LIBXML2;NEEDS_XERCESC;NEEDS_XSD;NEEDS_QT;PUBLIC" # possible options "SHARED;STATIC;NEEDS_CAMITK;NEEDS_ITK;NEEDS_LIBXML2;NEEDS_XERCESC;NEEDS_XSD;NEEDS_QT;PUBLIC" # possible options
${ARGN} ${ARGN}
) )
...@@ -401,7 +403,12 @@ macro(camitk_library) ...@@ -401,7 +403,12 @@ macro(camitk_library)
# # # #
######################################################################### #########################################################################
# LINKING LIBRARIES # LINKING LIBRARIES
target_link_libraries(${LIBRARY_TARGET_NAME} ${CEP_LIBRARIES} ${LINKER_EXTERNAL_LIBRARIES} ${LIBXML2_LIBRARY} ${CAMITK_ITK_LIBRARIES} ${XERCESC_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