Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit b5f9f671 authored by Jean-Loup Haberbusch's avatar Jean-Loup Haberbusch
Browse files

Merge branch 'revert-604af00c' into 'develop'

Revert "Merge branch 'Bug/GDCM-File-not-found' into 'develop'"

See merge request !134
parents 604af00c 703a59cd
......@@ -22,13 +22,11 @@ set -e
# values to check
initTestData() {
# fill test data
extensionCount=( [4.2]=46 [4.1]=41 [4.0]=31 )
extensionCount=( [4.2]=43 [4.1]=41 [4.0]=31 )
componentExtensionCount=( [4.2]=14 [4.1]=14 [4.0]=14 )
actionExtensionCount=( [4.2]=30 [4.1]=27 [4.0]=27 )
viewerExtensionCount=( [4.2]=2 [4.1]=0 [4.0]=0 )
actionExtensionCount=( [4.2]=29 [4.1]=27 [4.0]=27 )
fileExtensionCount=( [4.2]=37 [4.1]=37 [4.0]=37 )
actionCount=( [4.2]=108 [4.1]=105 [4.0]=105 )
viewerCount=( [4.2]=2 [4.1]=0 [4.0]=0 )
actionCount=( [4.2]=107 [4.1]=105 [4.0]=105 )
# fill release date
releaseDate=( [4.2]="not yet released, current development version" \
......@@ -50,10 +48,8 @@ declareTestData() {
declare -Ag extensionCount
declare -Ag componentExtensionCount
declare -Ag actionExtensionCount
declare -Ag viewerExtensionCount
declare -Ag fileExtensionCount
declare -Ag actionCount
declare -Ag viewerCount
declare -Ag releaseDate
}
......@@ -178,9 +174,6 @@ getExpectedValue() {
;;
"Number of Action Extensions")
echo ${actionExtensionCount[$shortVersion]}
;;
"Number of Viewer Extensions")
echo ${viewerExtensionCount[$shortVersion]}
;;
"Number of File Extensions Supported")
echo ${fileExtensionCount[$shortVersion]}
......@@ -188,9 +181,6 @@ getExpectedValue() {
"Number of Actions")
echo ${actionCount[$shortVersion]}
;;
"Number of Viewers")
echo ${viewerCount[$shortVersion]}
;;
esac
}
......@@ -294,9 +284,7 @@ else
fi
checkValue "Number of Component Extensions"
checkValue "Number of Action Extensions"
checkValue "Number of Viewer Extensions"
checkValue "Number of File Extensions Supported"
checkValue "Number of Actions"
checkValue "Number of Viewers"
exit $exitStatus
......@@ -42,7 +42,6 @@ if(APIDOC_SDK)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/libraries/qtpropertybrowser)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../modeling/libraries)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/actions)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/viewers)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../modeling/actions)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../imaging/actions)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/applications)
......
......@@ -116,13 +116,10 @@ set(CAMITK_LINK_DIRECTORIES
# CEP extensions dependencies
${CAMITK_PRIVATE_LIB_DIR}/components
${CAMITK_PRIVATE_LIB_DIR}/actions
${CAMITK_PRIVATE_LIB_DIR}/viewers
${CAMITK_USER_PRIVATE_LIB_DIR}/components
${CAMITK_USER_PRIVATE_LIB_DIR}/actions
${CAMITK_USER_PRIVATE_LIB_DIR}/viewers
${CAMITK_BUILD_PRIVATE_LIB_DIR}/components
${CAMITK_BUILD_PRIVATE_LIB_DIR}/actions
${CAMITK_BUILD_PRIVATE_LIB_DIR}/viewers
)
# List of directories where the compiler should look for CamiTK core headers as well
......@@ -252,8 +249,7 @@ if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}"
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/components"
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/actions"
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/viewers")
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/actions")
endif()
#-- update module path
......
......@@ -44,8 +44,8 @@ macro(export_headers)
set(multiValueArgs "")
cmake_parse_arguments(EXPORT_HEADER "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# Remove prefix for the destination directory
string(REGEX REPLACE "^component-|^component_|^action-|^action_|^viewer-|^viewer_|^library_|^library-" "" EXPORT_HEADER_DESTINATION "${EXPORT_HEADER_COMPONENT}")
# special case for components: remove prefix for the destination directory
string(REGEX REPLACE "^component-|^component_|^action-|^action_|^library_|^library-" "" EXPORT_HEADER_DESTINATION "${EXPORT_HEADER_COMPONENT}")
#
# 1. Create the build-time directory tree
......
......@@ -32,7 +32,6 @@
#! [NEEDS_CEP_LIBRARIES CEPLib1 CEPLib12 ...]
#! [NEEDS_COMPONENT_EXTENSION component1 component2 ...]
#! [NEEDS_ACTION_EXTENSION ation1 action2 ...]
#! [NEEDS_VIEWER_EXTENSION viewer1 viewer2 ...]
#! [DEFINES flag1 flag2 ...]
#! [CXX_FLAGS flag1 flag2 ...]
#! [ADDITIONAL_SOURCES source.cxx source.cpp ...]
......@@ -46,8 +45,7 @@
#! \param NEEDS_ITK means this application requires ITK to be compiled / run.
#! \param NEEDS_CEP_LIBRARIES list of needed camitk CEP libraries
#! \param NEEDS_COMPONENT_EXTENSION list of needed component extensions
#! \param NEEDS_ACTION_EXTENSION list of needed action extensions
#! \param NEEDS_VIEWER_EXTENSION list of needed viewer extensions
#! \param NEEDS_ACTION_EXTENSION list of needed component extensions
#! \param DEFINES list of define flags to add at compilation time
#! \param CXX_FLAGS list of compiler flags to add (such as warning levels (-Wall ...)).
#! \param ADDITIONAL_SOURCES list of additional sources (that cannot be automatically found by gather_headers_and_sources macro)
......@@ -57,7 +55,6 @@
#! \param INCLUDE_DIRECTORIES additional include directories
#! \param EXTERNAL_LIBRARIES external libraries to add to the link command
#! \param EXTRA_TRANSLATE_LANGUAGE Additionnal extra language to translate the application
#!
macro(camitk_application)
# Instruct CMake to run moc automatically when needed.
......@@ -76,7 +73,7 @@ macro(camitk_application)
set(options DISABLED NEEDS_ITK NEEDS_XSD NEEDS_XERCESC NEEDS_PYTHON)
set(oneValueArgs "")
set(multiValueArgs NEEDS_CEP_LIBRARIES NEEDS_TOOL NEEDS_COMPONENT_EXTENSION NEEDS_ACTION_EXTENSION NEEDS_VIEWER_EXTENSION DEFINES CXX_FLAGS ADDITIONAL_SOURCES CEP_NAME DESCRIPTION EXTERNAL_LIBRARIES INCLUDE_DIRECTORIES EXTRA_TRANSLATE_LANGUAGE)
set(multiValueArgs NEEDS_CEP_LIBRARIES NEEDS_TOOL NEEDS_COMPONENT_EXTENSION NEEDS_ACTION_EXTENSION DEFINES CXX_FLAGS ADDITIONAL_SOURCES CEP_NAME DESCRIPTION EXTERNAL_LIBRARIES INCLUDE_DIRECTORIES EXTRA_TRANSLATE_LANGUAGE)
cmake_parse_arguments(${APPLICATION_NAME_CMAKE} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
......@@ -343,7 +340,7 @@ macro(camitk_application)
# #
#########################################################################
# 1) CAMITKCORE LIBRARY DEPENDENCY
# 1st CAMITKCORE LIBRARY DEPENDENCY
# add the target dependency (i.e., enable proper parallelization of the build process
# only if inside the sdk build
if(CAMITK_COMMUNITY_EDITION_BUILD)
......@@ -352,7 +349,7 @@ macro(camitk_application)
set_property(TARGET ${APPLICATION_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${CAMITK_CORE_TARGET_LIB_NAME})
endif()
# 2) COMPONENTS DEPENDENCIES
# 2nd COMPONENTS DEPENDENCIES
if(${APPLICATION_NAME_CMAKE}_NEEDS_COMPONENT_EXTENSION)
set(COMPONENTS_DEPENDENCY_LIST "") #use for generating the project.xml file
foreach(COMPONENT_NEEDED ${${APPLICATION_NAME_CMAKE}_NEEDS_COMPONENT_EXTENSION})
......@@ -382,7 +379,7 @@ macro(camitk_application)
endforeach()
endif()
# 3) ACTIONS DEPENDENCIES
# 3rd ACTIONS DEPENDENCIES
if(${APPLICATION_NAME_CMAKE}_NEEDS_ACTION_EXTENSION)
set(ACTIONS_DEPENDENCY_LIST "") #use for generating the project.xml file
foreach(ACTION_NEEDED ${${APPLICATION_NAME_CMAKE}_NEEDS_ACTION_EXTENSION})
......@@ -412,37 +409,7 @@ macro(camitk_application)
endforeach()
endif()
# 4) VIEWERS DEPENDENCIES
if(${APPLICATION_NAME_CMAKE}_NEEDS_VIEWER_EXTENSION)
set(VIEWERS_DEPENDENCY_LIST "") #use for generating the project.xml file
foreach(VIEWER_NEEDED ${${APPLICATION_NAME_CMAKE}_NEEDS_VIEWER_EXTENSION})
# include directories from build, camitk (local or global install).
include_directories(${CAMITK_BUILD_INCLUDE_DIR}/viewers/${VIEWER_NEEDED})
include_directories(${CAMITK_INCLUDE_DIR}/viewers/${VIEWER_NEEDED})
# file dependency
if (MSVC)
list(APPEND VIEWER_EXTENSION_LIBRARIES
debug ${CAMITK_BUILD_PRIVATE_LIB_DIR}/viewers/${VIEWER_NEEDED}${CAMITK_DEBUG_POSTFIX}.lib
optimized ${VIEWER_NEEDED}
)
else()
list(APPEND VIEWER_EXTENSION_LIBRARIES ${VIEWER_NEEDED})
endif()
# CMake / CDash dependencies
if (PACKAGING_NSIS)
add_dependencies(${APPLICATION_TARGET_NAME} viewer_${VIEWER_NEEDED})
# add the dependency to the viewer automoc target
set_property(TARGET ${APPLICATION_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS viewer_${VIEWER_NEEDED})
else()
add_dependencies(${APPLICATION_TARGET_NAME} viewer-${VIEWER_NEEDED})
list(APPEND VIEWERS_DEPENDENCY_LIST viewer-${VIEWER_NEEDED})
# add the dependency to the viewer automoc target
set_property(TARGET ${APPLICATION_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS viewer-${VIEWER_NEEDED})
endif()
endforeach()
endif()
# 5) CEP LIBRARIES DEPENDENCIES
# 4th CEP LIBRARIES DEPENDENCIES
if(${APPLICATION_NAME_CMAKE}_NEEDS_CEP_LIBRARIES)
set(CEP_LIBRARIES_DEPENDENCY_LIST "") #use for generating the project.xml file
foreach(CEP_LIBRARY_NEEDED ${${APPLICATION_NAME_CMAKE}_NEEDS_CEP_LIBRARIES})
......@@ -508,7 +475,7 @@ macro(camitk_application)
# #
#########################################################################
# LINKING LIBRARIES
target_link_libraries(${APPLICATION_TARGET_NAME} ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES} ${COMPONENT_EXTENSION_LIBRARIES} ${ACTION_EXTENSION_LIBRARIES} ${VIEWER_EXTENSION_LIBRARIES} ${CEP_LIBRARIES} ${XERCESC_LIBRARY} ${CAMITK_ITK_LIBRARIES} ${PYTHON_LIBRARIES} ${EXTERNAL_LIBRARIES})
target_link_libraries(${APPLICATION_TARGET_NAME} ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES} ${COMPONENT_EXTENSION_LIBRARIES} ${ACTION_EXTENSION_LIBRARIES} ${CEP_LIBRARIES} ${XERCESC_LIBRARY} ${CAMITK_ITK_LIBRARIES} ${PYTHON_LIBRARIES} ${EXTERNAL_LIBRARIES})
......@@ -573,7 +540,7 @@ macro(camitk_application)
# if(NOT ((APPLICATION_TARGET_NAME STREQUAL "application-testactions") OR (APPLICATION_TARGET_NAME STREQUAL "application-testcomponents")))
# We will add manually the CDash dependencies of the testing applications
# See CamiTKCDashPublishSubProject.cmake
camitk_register_subproject(APPLICATION ${APPLICATION_TARGET_NAME} DEPENDENCIES library-camitkcore ${COMPONENTS_DEPENDENCY_LIST} ${ACTIONS_DEPENDENCY_LIST} ${VIEWERS_DEPENDENCY_LIST} ${CEP_LIBRARIES_DEPENDENCY_LIST})
camitk_register_subproject(APPLICATION ${APPLICATION_TARGET_NAME} DEPENDENCIES library-camitkcore ${COMPONENTS_DEPENDENCY_LIST} ${ACTIONS_DEPENDENCY_LIST} ${CEP_LIBRARIES_DEPENDENCY_LIST})
# endif()
#####################################################################################
......
#!
#! @ingroup group_sdk_cmake_camitk
#!
#! Macro camitk_extension simplifies writing a camitk extension (component, action, viewer)
#! Macro camitk_extension simplifies writing a camitk extension (component, action)
#!
#! The name of the extension is automatically the name of the directory from where this macro
#! is called, unless it is overriden by the TARGET_NAME parameter.
#!
#! \note
#! To be more precise, after the execution of this macro, the variable <type>_TARGET_NAME (i.e.,
#! ACTION_TARGET_NAME, COMPONENT_TARGET_NAME, or VIEWER_TARGET_NAME) holds the name
#! of the CMake target produced by this macro.
#! The target name itself is equals to either "action-<name>", "component-<name>"
#! or viewer-<name> (depending on the <type> of the extension), where <name> is
#! the name of the current folder in lowercase, unless TARGET_NAME
#! To be more precise, after the execution of this macro, the variable <type>_TARGET_NAME (e.g.
#! ACTION_TARGET_NAME or COMPONENT_TARGET_NAME) holds the name of the CMake target produced by this macro.
#! The target name itself is equals to either "action-<name>" or "component-<name>" (depending on the <type>
#! of the extension), where <name> is the name of the current folder in lowercase, unless TARGET_NAME
#! is provided
#! On windows, the "-" (dash) is replaced by "_" (underscore)
#!
#! usage:
#! \code
......@@ -27,7 +24,6 @@
#! [NEEDS_XSD]
#! [NEEDS_GDCM]
#! [NEEDS_ACTION_EXTENSION action1 action2 ...]
#! [NEEDS_VIEWER_EXTENSION viewer1 viewer2 ...]
#! [NEEDS_COMPONENT_EXTENSION component1 component2 ...]
#! [NEEDS_CEP_LIBRARIES CEPLib1 CEPLib2 ...]
#! [INCLUDE_DIRECTORIES dir1 dir2 ...]
......@@ -49,21 +45,19 @@
#! \endcode
#!
#! \param <type> = REQUIRED. The selected type of extension you wish to build.
# possible values : ACTION_EXTENSION, COMPONENT_EXTENSION
#! or VIEWER_EXTENSION.
# possible values : ACTION_EXTENSION or COMPONENT_EXTENSION.
#! \param DISABLED = means this is a not a default extension, it will not be compiled automatically
#! \param NEEDS_ITK = add this if your extension needs ITK.
#! \param NEEDS_ITK = add this if your component needs ITK.
#! Do not forget to add the needed list of ITK libraries in the LIBRARIES parameter
#! \param NEEDS_LIBXML2 = add this if your extension needs libxml2
#! \param NEEDS_XSD = add this if your extension needs Codesynthesis xsd cxx (xml schema compiler)
#! \param NEEDS_OPENCV = add this if your extension needs OpenCV
#! \param NEEDS_IGSTK = add this if your extension needs IgsTK
#! \param NEEDS_XERCESC = add this if your extension needs XercesC library
#! \param NEEDS_GDCM = Add this if your extension requires GDCM library
#! \param NEEDS_LIBXML2 = add this if your component needs libxml2
#! \param NEEDS_XSD = add this if your action needs Codesynthesis xsd cxx (xml schema compiler)
#! \param NEEDS_OPENCV = add this if your component needs OpenCV
#! \param NEEDS_IGSTK = add this if your component needs IgsTK
#! \param NEEDS_XERCESC = add this if your action / component needs XercesC library
#! \param NEEDS_GDCM = Add this, if your extension requires GDCM 2.x library
#! \param NEEDS_CEP_LIBRARIES = list of needed CEP libraries (not external dependencies)
#! \param NEEDS_COMPONENT_EXTENSION = list of needed component extensions
#! \param NEEDS_ACTION_EXTENSION = list of needed action extensions
#! \param NEEDS_VIEWER_EXTENSION = list of needed viewer extensions
#! \param NEEDS_ACTION_EXTENSION = list of needed component extensions
#! \param INCLUDE_DIRECTORIES = additional include directories
#! \param DEFINES = list of define flags to add at compilation time.
#! \param CXX_FLAGS = list of compiler flags to add (such as warning levels (-Wall ...)).
......@@ -72,17 +66,17 @@
#! Note: EXTERNAL_SOURCES are not installed
#! \param EXTERNAL_LIBRARIES = external libraries to add to the link command
#! \param HEADERS_TO_INSTALL = list of headers to install, if present this will automatically
#! create an "install-EXTENSION_NAME" target, that can be used
#! anywhere else to manage dependencies to this extension.
#! The headers are installed ${CAMITK_BUILD_INCLUDE_DIR}/EXTENSION_TYPE/EXTENSION_NAME
#! when the target "install-EXTENSION_NAME" is called.
#! create an "install-COMPONENT_NAMEcomponent" target, that can be used
#! anywhere else to manage dependencies to this component.
#! The headers are installed ${CAMITK_BUILD_INCLUDE_DIR}/COMPONENT_NAME
#! when the target "install-COMPONENT_NAMEcomponent" is called.
#! \param INSTALL_ALL_HEADERS = install all of the headers (this is the lazy solution, please consider
#! making a list and using HEADERS_TO_INSTALL parameter instead.
#! Only the files matching the regex *.h will be install. If you need to add
#! other files, you need to use the HEADERS_TO_INSTALL option.
#! \param TARGET_NAME = specify a target name different than the default (default is the extension source code directory name)
#! this can be very useful for example when you have an extension source code directory in your CEP that has
#! the same name as one in the camitk community edition.
#! \param TARGET_NAME = specify a target name different than the default (default is the action/component directory name)
#! this can be very useful for example when you have action/component directory in your CEP that has
#! the same name as one in the camitk communityedition.
#! \param CEP_NAME = specify the CEP_NAME, which is used to categorized the extension for packaging purpose
#! No CEP_NAME provided will result in default categorization (generic extension).
#! \param DESCRIPTION = Simple description of the extension. Used for packaging presentation for instance.
......@@ -119,6 +113,7 @@ macro(camitk_extension)
set(CMAKE_AUTOMOC ON)
#########################################################################
# #
# ARGUMENTS PARSING #
......@@ -130,9 +125,9 @@ macro(camitk_extension)
get_directory_name(${CMAKE_CURRENT_SOURCE_DIR} EXTENSION_NAME)
set(options ACTION_EXTENSION COMPONENT_EXTENSION VIEWER_EXTENSION DISABLED NEEDS_XERCESC NEEDS_ITK NEEDS_LIBXML2 NEEDS_XSD NEEDS_OPENCV NEEDS_IGSTK INSTALL_ALL_HEADERS NEEDS_GDCM ENABLE_AUTO_TEST ENABLE_INTEGRATION_TEST)
set(options ACTION_EXTENSION COMPONENT_EXTENSION DISABLED NEEDS_XERCESC NEEDS_ITK NEEDS_LIBXML2 NEEDS_XSD NEEDS_OPENCV NEEDS_IGSTK INSTALL_ALL_HEADERS NEEDS_GDCM ENABLE_AUTO_TEST ENABLE_INTEGRATION_TEST)
set(oneValueArgs TARGET_NAME CEP_NAME DESCRIPTION AUTO_TEST_LEVEL)
set(multiValueArgs NEEDS_TOOL NEEDS_CEP_LIBRARIES NEEDS_COMPONENT_EXTENSION NEEDS_ACTION_EXTENSION NEEDS_VIEWER_EXTENSION INCLUDE_DIRECTORIES EXTERNAL_LIBRARIES HEADERS_TO_INSTALL DEFINES CXX_FLAGS EXTERNAL_SOURCES EXTRA_TRANSLATE_LANGUAGE TEST_FILES)
set(multiValueArgs NEEDS_TOOL NEEDS_CEP_LIBRARIES NEEDS_COMPONENT_EXTENSION NEEDS_ACTION_EXTENSION INCLUDE_DIRECTORIES EXTERNAL_LIBRARIES HEADERS_TO_INSTALL DEFINES CXX_FLAGS EXTERNAL_SOURCES EXTRA_TRANSLATE_LANGUAGE TEST_FILES)
cmake_parse_arguments(${EXTENSION_NAME_CMAKE} "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} )
......@@ -144,16 +139,13 @@ macro(camitk_extension)
# #
#########################################################################
# TYPE EXTENSION : ACTION or COMPONENT or VIEWER
# TYPE EXTENSION : ACTION or COMPONENT
if (${EXTENSION_NAME_CMAKE}_ACTION_EXTENSION)
set(TYPE_EXTENSION "action")
string(TOUPPER ${TYPE_EXTENSION} TYPE_EXTENSION_CMAKE)
elseif(${EXTENSION_NAME_CMAKE}_COMPONENT_EXTENSION)
set(TYPE_EXTENSION "component")
string(TOUPPER ${TYPE_EXTENSION} TYPE_EXTENSION_CMAKE)
elseif(${EXTENSION_NAME_CMAKE}_VIEWER_EXTENSION)
set(TYPE_EXTENSION "viewer")
string(TOUPPER ${TYPE_EXTENSION} TYPE_EXTENSION_CMAKE)
endif()
# CMAKE CACHE VARIABLE
......@@ -368,28 +360,34 @@ macro(camitk_extension)
if(GDCM_FOUND)
include(${GDCM_USE_FILE})
if (MSVC)
# List all available GDCM library files
file(GLOB GDCM_LIB_FILES
LIST_DIRECTORIES false
"${GDCM_DIR}/../*${CAMITK_DEBUG_POSTFIX}.lib"
set(GDCM_LIBRARIES
debug ${GDCM_DIR}/../gdcmcharls${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmCommon${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmDICT${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmDSED${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmexpat${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmgetopt${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmIOD${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmjpeg8${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmjpeg12${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmjpeg16${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmMEXD${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmMSFF${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmopenjpeg${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmzlib${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../socketxx${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../vtkgdcm${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmDSED${CAMITK_DEBUG_POSTFIX}.lib
optimized gdcmcharls gdcmCommon gdcmDICT gdcmDSED gdcmexpat
optimized gdcmgetopt gdcmIOD gdcmjpeg8 gdcmjpeg12 gdcmjpeg16
optimized gdcmMEXD gdcmMSFF gdcmopenjpeg gdcmzlib socketxx vtkgdcm
optimized gdcmDSED
)
unset(GDCM_LIBRARIES)
foreach(GDCM_LIB_FILE ${GDCM_LIB_FILES})
# Get the actual name of the library
string(REGEX REPLACE "^.*/(.*)${CAMITK_DEBUG_POSTFIX}.lib"
"\\1" GDCM_LIB_FILE_OPTIMIZED
"${GDCM_LIB_FILE}")
# Add both debug and optimized version
set(GDCM_LIBRARIES ${GDCM_LIBRARIES} debug ${GDCM_LIB_FILE}
optimized ${GDCM_LIB_FILE_OPTIMIZED})
endforeach()
else()
set(GDCM_LIBRARIES gdcmCommon gdcmDICT gdcmDSED gdcmMEXD gdcmMSFF vtkgdcm)
endif()
else()
message(ERROR "${EXTENSION_NAME}: GDCM 2.x or above library required. Please install GDCM.")
message(ERROR "${EXTENSION_NAME}: GDCM 2.x library required. Please install GDCM.")
endif()
endif()
......@@ -542,39 +540,6 @@ macro(camitk_extension)
endforeach()
endif()
# 3rd VIEWERS DEPENDENCIES
if(${EXTENSION_NAME_CMAKE}_NEEDS_VIEWER_EXTENSION)
set(VIEWERS_DEPENDENCY_LIST "") #use for generating the project.xml file
foreach(VIEWER_NEEDED ${${EXTENSION_NAME_CMAKE}_NEEDS_VIEWER_EXTENSION})
# include directories from build, camitk (local or global install).
include_directories(${CAMITK_BUILD_INCLUDE_DIR}/viewers/${VIEWER_NEEDED})
include_directories(${CAMITK_INCLUDE_DIR}/viewers/${VIEWER_NEEDED})
# file dependency
if (MSVC)
list(APPEND VIEWER_EXTENSION_LIBRARIES debug ${CAMITK_BUILD_PRIVATE_LIB_DIR}/viewers/${VIEWER_NEEDED}${CAMITK_DEBUG_POSTFIX}.lib
optimized ${VIEWER_NEEDED}
)
else()
list(APPEND VIEWER_EXTENSION_LIBRARIES ${VIEWER_NEEDED})
endif()
# CMake / CDash dependencies
if (PACKAGING_NSIS)
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} viewer_${VIEWER_NEEDED})
# add the dependency to the component automoc target only if compiling SDK
if(CAMITK_COMMUNITY_EDITION_BUILD)
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS viewer_${VIEWER_NEEDED})
endif()
else()
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} viewer-${VIEWER_NEEDED})
list(APPEND VIEWERS_DEPENDENCY_LIST viewer-${VIEWER_NEEDED})
# add the dependency to the component automoc target only if compiling SDK
if(CAMITK_COMMUNITY_EDITION_BUILD)
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS viewer-${VIEWER_NEEDED})
endif()
endif()
endforeach()
endif()
# 4th CEP LIBRARIES DEPENDENCIES
if(${EXTENSION_NAME_CMAKE}_NEEDS_CEP_LIBRARIES)
set(CEP_LIBRARIES_DEPENDENCY_LIST "") #use for generating the project.xml file
......@@ -654,7 +619,7 @@ macro(camitk_extension)
#########################################################################
# LINKING LIBRARIES
# Any component or action has to be linked with ${CAMITK_CORE_LIBRARIES} and with all its dependencies
target_link_libraries(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES} ${COMPONENT_EXTENSION_LIBRARIES} ${ACTION_EXTENSION_LIBRARIES} ${VIEWER_EXTENSION_LIBRARIES} ${CEP_LIBRARIES} ${CAMITK_ITK_LIBRARIES} ${LIBXML2_LIBRARY} ${OpenCV_LIBRARIES} ${IGSTK_LIBRARIES} ${XERCESC_LIBRARIES} ${GDCM_LIBRARIES} ${EXTERNAL_LIBRARIES})
target_link_libraries(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} ${CAMITK_CORE_LIBRARIES} ${CAMITK_LIBRARIES} ${COMPONENT_EXTENSION_LIBRARIES} ${ACTION_EXTENSION_LIBRARIES} ${CEP_LIBRARIES} ${CAMITK_ITK_LIBRARIES} ${LIBXML2_LIBRARY} ${OpenCV_LIBRARIES} ${IGSTK_LIBRARIES} ${XERCESC_LIBRARIES} ${GDCM_LIBRARIES} ${EXTERNAL_LIBRARIES})
......@@ -779,7 +744,7 @@ macro(camitk_extension)
# #
#########################################################################
# CDASH XML SUBPROJECTS DESCRIPTION UPDATE
camitk_register_subproject(${TYPE_EXTENSION_CMAKE} ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} DEPENDENCIES library-camitkcore ${COMPONENTS_DEPENDENCY_LIST} ${ACTIONS_DEPENDENCY_LIST} ${VIEWERS_DEPENDENCY_LIST} ${CEP_LIBRARIES_DEPENDENCY_LIST})
camitk_register_subproject(${TYPE_EXTENSION_CMAKE} ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} DEPENDENCIES library-camitkcore ${COMPONENTS_DEPENDENCY_LIST} ${ACTIONS_DEPENDENCY_LIST} ${CEP_LIBRARIES_DEPENDENCY_LIST})
......
......@@ -25,7 +25,7 @@
#! \param COMPONENT (required) Name of the component to use. This is also the include subdirectory name
#! used for copying the file
#! \param GROUP (optional) Name of the group this install should be using group will be
#! prepend to the component name. This is either actions, components, viewers or libraries.
#! prepend to the component name. This is either actions, components or libraries.
#!
#! Example invocation:
#!
......@@ -58,7 +58,7 @@ macro(camitk_install_all_headers)
# Get action, component or library name without its prefix
set(CAMITK_INSTALL_ALL_HEADERS_TARGET_NAME ${CAMITK_INSTALL_ALL_HEADERS_COMPONENT})
string(REGEX REPLACE "^component-|^component_|^action-|^action_|^viewer-|^viewer_|^library_|^library-" "" CAMITK_INSTALL_ALL_HEADERS_COMPONENT "${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}")
string(REGEX REPLACE "^component-|^component_|^action-|^action_|^library_|^library-" "" CAMITK_INSTALL_ALL_HEADERS_COMPONENT "${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}")
# Check group directory
if(CAMITK_INSTALL_ALL_HEADERS_GROUP)
......@@ -131,3 +131,4 @@ macro(camitk_install_all_headers)
)
endforeach()
endmacro()
......@@ -4,13 +4,12 @@
#! macro camitk_register_subproject adds a subproject definition for the CDash report
#!
#! Subprojects in CDash shows configure/build/test information by subprojects.
#! There are 7 types of subprojects:
#! In CamiTK there are 6 types of subprojects:
#! - the corelib (only present in the SDK)
#! - the cep library (one subproject per library of the CEP)
#! - the application action (only present in the SDK for application actions)
#! - the component (one subproject per component extension of the CEP)
#! - the action (one subproject per action extension of the CEP)
#! - the viewer (one subproject per viewer extension of the CEP)
#! - the application (one subproject per application of the CEP)
#!
#! Note: application actions are special actions grouped into a specific action extension.
......@@ -32,12 +31,11 @@
#! - CAMITK_APPLICATION_ACTION_SUBPROJECTS is the XML fragment describing the application actions (only found in the SDK)
#! - CAMITK_COMPONENT_SUBPROJECTS is the XML fragment describing the component extensions created by the CEP
#! - CAMITK_ACTION_SUBPROJECTS is the XML fragment describing the action extensions created by the CEP
#! - CAMITK_VIEWER_SUBPROJECTS is the XML fragment describing the viewer extensions created by the CEP
#! - CAMITK_APPLICATION_SUBPROJECTS is the XML Fragment describing applications created by the CEP
#!
#! Usage:
#! \code
#! camitk_register_subproject(CORELIB|CEP_LIBRARY|COMPONENT|ACTION|VIEWER|APPLICATION targetName
#! camitk_register_subproject(CORELIB|CEP_LIBRARY|COMPONENT|ACTION|APPLICATION targetName
#! [DEPENDENCIES dep1 dep2 dep3]
#! )
#! \endcode
......@@ -47,7 +45,7 @@
macro(camitk_register_subproject)
set(options "")
set(oneValueArgs ACTION COMPONENT VIEWER CEP_LIBRARY APPLICATION CORELIB)
set(oneValueArgs ACTION COMPONENT CEP_LIBRARY APPLICATION CORELIB)
set(multiValueArgs DEPENDENCIES)
cmake_parse_arguments(ADD_SUB_PROJECT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
......@@ -81,13 +79,6 @@ macro(camitk_register_subproject)
set(CAMITK_ACTION_TARGETS ${CAMITK_ACTION_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of action extension targets" FORCE)
endif()
# VIEWERS
if(ADD_SUB_PROJECT_VIEWER)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_VIEWER})
# Add the project to the corresponding list
set(CAMITK_VIEWER_TARGETS ${CAMITK_VIEWER_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of viewer extension targets" FORCE)
endif()
# APPLICATION
if(ADD_SUB_PROJECT_APPLICATION)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_APPLICATION})
......@@ -144,11 +135,6 @@ macro(camitk_register_subproject)
endif()
endif()
# VIEWERS
if(ADD_SUB_PROJECT_VIEWER)
set(CAMITK_VIEWER_SUBPROJECTS ${CAMITK_VIEWER_SUBPROJECTS} ${SUBPROJECT_XML_FRAGMENT} CACHE INTERNAL "XML description of viewer extension subprojects")
endif()
# APPLICATION
if(ADD_SUB_PROJECT_APPLICATION)
# Add the xml fragment for the current subproject
......
......@@ -4,13 +4,12 @@
#! MACRO camitk_init_manifest_data initializes the global variables that will
#! gather all the information about all the subprojects.
#!
#! There are 7 types of subprojects:
#! In CamiTK there are 6 types of subprojects:
#! - the corelib (only present in the SDK)
#! - the cep library (one subproject per library of the CEP)
#! - the application action (only present in the SDK for application actions)
#! - the component (one subproject per component extension of the CEP)
#! - the action (one subproject per action extension of the CEP)
#! - the viewer (one subproject per viewer extension of the CEP)
#! - the application (one subproject per application of the CEP)
#!
#! Note: application actions are special actions grouped into a specific action extension.
......@@ -31,7 +30,6 @@
#! - CAMITK_APPLICATION_ACTION_SUBPROJECTS is the XML fragment describing the application actions (only found in the SDK)
#! - CAMITK_COMPONENT_SUBPROJECTS is the XML fragment describing the component extensions created by the CEP
#! - CAMITK_ACTION_SUBPROJECTS is the XML fragment describing the action extensions created by the CEP
#! - CAMITK_VIEWER_SUBPROJECTS is the XML fragment describing the viewer extensions created by the CEP
#! - CAMITK_APPLICATION_SUBPROJECTS is the XML Fragment describing applications created by the CEP
#!
#! The CAMITK_TARGETS variable list all the targets. It is also used by CDash.
......@@ -41,7 +39,6 @@
#! - CAMITK_CEP_LIBRARY_TARGETS
#! - CAMITK_COMPONENT_TARGETS
#! - CAMITK_ACTION_TARGETS
#! - CAMITK_VIEWER_TARGETS
#! - CAMITK_APPLICATION_TARGETS
#!
#! usage:
......@@ -73,7 +70,6 @@ macro(camitk_init_manifest_data_reset_variables NAME)
set(CAMITK_CEP_LIBRARY_TARGETS "" CACHE STRING "List of library extension targets" FORCE)
set(CAMITK_COMPONENT_TARGETS "" CACHE STRING "List of component extension targets" FORCE)
set(CAMITK_ACTION_TARGETS "" CACHE STRING "List of action extension targets" FORCE)
set(CAMITK_VIEWER_TARGETS "" CACHE STRING "List of viewer extension targets" FORCE)
set(CAMITK_APPLICATION_TARGETS "" CACHE STRING "List of application targets" FORCE)
# Subproject list (XML document)
......@@ -85,7 +81,6 @@ macro(camitk_init_manifest_data_reset_variables NAME)
set(CAMITK_APPLICATION_ACTION_SUBPROJECTS "" CACHE INTERNAL "XML description of application action extension subprojects")
set(CAMITK_COMPONENT_SUBPROJECTS "" CACHE INTERNAL "XML description of component extension subprojects")
set(CAMITK_ACTION_SUBPROJECTS "" CACHE INTERNAL "XML description of action extension subprojects")
set(CAMITK_VIEWER_SUBPROJECTS "" CACHE INTERNAL "XML description of viewer extension subprojects")
set(CAMITK_APPLICATION_SUBPROJECTS "" CACHE INTERNAL "XML description of application subprojects")
endmacro()
......@@ -52,7 +52,6 @@ macro(camitk_write_manifest_data)
# else() # Other external CEP
set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${CAMITK_COMPONENT_SUBPROJECTS})
set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${CAMITK_ACTION_SUBPROJECTS})
set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${CAMITK_VIEWER_SUBPROJECTS})
set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${CAMITK_APPLICATION_SUBPROJECTS})
# endif()
......
......@@ -44,7 +44,6 @@ list(REMOVE_DUPLICATES CAMITK_ACTION_TARGETS)
list(REMOVE_DUPLICATES CAMITK_COMPONENT_TARGETS)
list(REMOVE_DUPLICATES CAMITK_CEP_LIBRARY_TARGETS)
list(REMOVE_DUPLICATES CAMITK_APPLICATION_TARGETS)