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
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# CamiTK Community Edition CEP Set # CamiTK Community Edition CEP Set
# #
#-------------------------------------------- #--------------------------------------------
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
project(camitkcommunityedition) project(camitkcommunityedition)
......
...@@ -22,13 +22,11 @@ set -e ...@@ -22,13 +22,11 @@ set -e
# values to check # values to check
initTestData() { initTestData() {
# fill test data # 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 ) componentExtensionCount=( [4.2]=14 [4.1]=14 [4.0]=14 )
actionExtensionCount=( [4.2]=30 [4.1]=27 [4.0]=27 ) actionExtensionCount=( [4.2]=29 [4.1]=27 [4.0]=27 )
viewerExtensionCount=( [4.2]=2 [4.1]=0 [4.0]=0 )
fileExtensionCount=( [4.2]=37 [4.1]=37 [4.0]=37 ) fileExtensionCount=( [4.2]=37 [4.1]=37 [4.0]=37 )
actionCount=( [4.2]=108 [4.1]=105 [4.0]=105 ) actionCount=( [4.2]=107 [4.1]=105 [4.0]=105 )
viewerCount=( [4.2]=2 [4.1]=0 [4.0]=0 )
# fill release date # fill release date
releaseDate=( [4.2]="not yet released, current development version" \ releaseDate=( [4.2]="not yet released, current development version" \
...@@ -50,10 +48,8 @@ declareTestData() { ...@@ -50,10 +48,8 @@ declareTestData() {
declare -Ag extensionCount declare -Ag extensionCount
declare -Ag componentExtensionCount declare -Ag componentExtensionCount
declare -Ag actionExtensionCount declare -Ag actionExtensionCount
declare -Ag viewerExtensionCount
declare -Ag fileExtensionCount declare -Ag fileExtensionCount
declare -Ag actionCount declare -Ag actionCount
declare -Ag viewerCount
declare -Ag releaseDate declare -Ag releaseDate
} }
...@@ -179,18 +175,12 @@ getExpectedValue() { ...@@ -179,18 +175,12 @@ getExpectedValue() {
"Number of Action Extensions") "Number of Action Extensions")
echo ${actionExtensionCount[$shortVersion]} echo ${actionExtensionCount[$shortVersion]}
;; ;;
"Number of Viewer Extensions")
echo ${viewerExtensionCount[$shortVersion]}
;;
"Number of File Extensions Supported") "Number of File Extensions Supported")
echo ${fileExtensionCount[$shortVersion]} echo ${fileExtensionCount[$shortVersion]}
;; ;;
"Number of Actions") "Number of Actions")
echo ${actionCount[$shortVersion]} echo ${actionCount[$shortVersion]}
;; ;;
"Number of Viewers")
echo ${viewerCount[$shortVersion]}
;;
esac esac
} }
...@@ -294,9 +284,7 @@ else ...@@ -294,9 +284,7 @@ else
fi fi
checkValue "Number of Component Extensions" checkValue "Number of Component Extensions"
checkValue "Number of Action Extensions" checkValue "Number of Action Extensions"
checkValue "Number of Viewer Extensions"
checkValue "Number of File Extensions Supported" checkValue "Number of File Extensions Supported"
checkValue "Number of Actions" checkValue "Number of Actions"
checkValue "Number of Viewers"
exit $exitStatus exit $exitStatus
...@@ -40,9 +40,8 @@ if(APIDOC_SDK) ...@@ -40,9 +40,8 @@ if(APIDOC_SDK)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/libraries/core) set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/libraries/core)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/libraries/cepgenerator) set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/libraries/cepgenerator)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/libraries/qtpropertybrowser) 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}/../modeling/libraries)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/actions) 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}/../modeling/actions)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../imaging/actions) set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../imaging/actions)
set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/applications) set(DOXYGEN_SUBDIRS ${DOXYGEN_SUBDIRS} ${CMAKE_CURRENT_SOURCE_DIR}/applications)
...@@ -71,7 +70,7 @@ if(APIDOC_SDK) ...@@ -71,7 +70,7 @@ if(APIDOC_SDK)
get_filename_component(doxygenDocFilename ${CMAKE_MACRO} NAME_WE) get_filename_component(doxygenDocFilename ${CMAKE_MACRO} NAME_WE)
file(WRITE ${CMAKE_BINARY_DIR}/doxygencmake/${doxygenDocFilename}.h ${doxygenDocWithName}) file(WRITE ${CMAKE_BINARY_DIR}/doxygencmake/${doxygenDocFilename}.h ${doxygenDocWithName})
endforeach() endforeach()
# Configure doxyfile, doxygen project configuration file. # Configure doxyfile, doxygen project configuration file.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/doxygen.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/doxygen.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
......
...@@ -14,7 +14,7 @@ set(CAMITK_VERSION_MINOR "@CAMITK_VERSION_MINOR@") ...@@ -14,7 +14,7 @@ set(CAMITK_VERSION_MINOR "@CAMITK_VERSION_MINOR@")
# CamiTK short version name we are looking for # CamiTK short version name we are looking for
set(CAMITK_SHORT_VERSION_STRING "camitk-${CAMITK_VERSION_MAJOR}.${CAMITK_VERSION_MINOR}") set(CAMITK_SHORT_VERSION_STRING "camitk-${CAMITK_VERSION_MAJOR}.${CAMITK_VERSION_MINOR}")
#-- Cmake policy #-- Cmake policy
# Error on non-existent dependency in add_dependencies => old behavior (no error) # Error on non-existent dependency in add_dependencies => old behavior (no error)
# It is useful to have add_dependencies(anyextension camitkcore) for SDK/modeling/imaging dev # It is useful to have add_dependencies(anyextension camitkcore) for SDK/modeling/imaging dev
# It shoud not generate an error or a warning for external CEP trying to compile # It shoud not generate an error or a warning for external CEP trying to compile
...@@ -64,7 +64,7 @@ if(WIN32) ...@@ -64,7 +64,7 @@ if(WIN32)
file(TO_CMAKE_PATH "${CAMITK_USER_BASE_DIR_WINDOWS}" CAMITK_USER_BASE_DIR) file(TO_CMAKE_PATH "${CAMITK_USER_BASE_DIR_WINDOWS}" CAMITK_USER_BASE_DIR)
else() else()
# (UNIX OR APPLE) # (UNIX OR APPLE)
# $HOME/.config/MySoft/Star Runner.ini # $HOME/.config/MySoft/Star Runner.ini
set(CAMITK_USER_BASE_DIR "$ENV{HOME}/.config") set(CAMITK_USER_BASE_DIR "$ENV{HOME}/.config")
endif() endif()
set(CAMITK_USER_DIR "${CAMITK_USER_BASE_DIR}/CamiTK") set(CAMITK_USER_DIR "${CAMITK_USER_BASE_DIR}/CamiTK")
...@@ -100,7 +100,7 @@ if(PACKAGING_NSIS) ...@@ -100,7 +100,7 @@ if(PACKAGING_NSIS)
else() else()
set(CAMITK_CORE_TARGET_LIB_NAME library-${CAMITK_CORE_LIB_NAME}) set(CAMITK_CORE_TARGET_LIB_NAME library-${CAMITK_CORE_LIB_NAME})
endif() endif()
# All the link directories # All the link directories
set(CAMITK_LINK_DIRECTORIES set(CAMITK_LINK_DIRECTORIES
# private and public libs (including bin dir for windows) # private and public libs (including bin dir for windows)
...@@ -116,13 +116,10 @@ set(CAMITK_LINK_DIRECTORIES ...@@ -116,13 +116,10 @@ set(CAMITK_LINK_DIRECTORIES
# CEP extensions dependencies # CEP extensions dependencies
${CAMITK_PRIVATE_LIB_DIR}/components ${CAMITK_PRIVATE_LIB_DIR}/components
${CAMITK_PRIVATE_LIB_DIR}/actions ${CAMITK_PRIVATE_LIB_DIR}/actions
${CAMITK_PRIVATE_LIB_DIR}/viewers
${CAMITK_USER_PRIVATE_LIB_DIR}/components ${CAMITK_USER_PRIVATE_LIB_DIR}/components
${CAMITK_USER_PRIVATE_LIB_DIR}/actions ${CAMITK_USER_PRIVATE_LIB_DIR}/actions
${CAMITK_USER_PRIVATE_LIB_DIR}/viewers
${CAMITK_BUILD_PRIVATE_LIB_DIR}/components ${CAMITK_BUILD_PRIVATE_LIB_DIR}/components
${CAMITK_BUILD_PRIVATE_LIB_DIR}/actions ${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 # List of directories where the compiler should look for CamiTK core headers as well
...@@ -136,7 +133,7 @@ set(CAMITK_INCLUDE_DIRECTORIES ...@@ -136,7 +133,7 @@ set(CAMITK_INCLUDE_DIRECTORIES
${CAMITK_BUILD_INCLUDE_DIR} ${CAMITK_BUILD_INCLUDE_DIR}
${QT_INCLUDE_DIRS} ${QT_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS}
${CAMITK_BUILD_INCLUDE_DIR}/libraries ${CAMITK_BUILD_INCLUDE_DIR}/libraries
) )
# TODO: remove ${CAMITK_BUILD_INCLUDE_DIR}/libraries => find a better way to organize dependencies # TODO: remove ${CAMITK_BUILD_INCLUDE_DIR}/libraries => find a better way to organize dependencies
...@@ -149,7 +146,7 @@ if(MSVC) ...@@ -149,7 +146,7 @@ if(MSVC)
set(CAMITK_CORE_LIBRARIES optimized ${CAMITK_CORE_LIB_NAME} set(CAMITK_CORE_LIBRARIES optimized ${CAMITK_CORE_LIB_NAME}
debug ${CAMITK_CORE_LIB_NAME}${CAMITK_DEBUG_POSTFIX} debug ${CAMITK_CORE_LIB_NAME}${CAMITK_DEBUG_POSTFIX}
) )
# Construct list of VTK libraries for linking # Construct list of VTK libraries for linking
# CAMITK_VTK_LIBRARIES = VTK input libraries at linkage # CAMITK_VTK_LIBRARIES = VTK input libraries at linkage
foreach(VTK_LIBRARY ${VTK_LIBRARIES}) foreach(VTK_LIBRARY ${VTK_LIBRARIES})
...@@ -171,13 +168,13 @@ if(MSVC) ...@@ -171,13 +168,13 @@ if(MSVC)
endif() endif()
set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/${VTK_LIBRARY}-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/${VTK_LIBRARY}-${CAMITK_VTK_VERSION}.lib) set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/${VTK_LIBRARY}-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/${VTK_LIBRARY}-${CAMITK_VTK_VERSION}.lib)
endforeach() endforeach()
# add missing vtkIOExport, vtkImagingStencil, vtkIOImport, vtkImagingMath library # add missing vtkIOExport, vtkImagingStencil, vtkIOImport, vtkImagingMath library
set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkIOExport-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkIOExport-${CAMITK_VTK_VERSION}.lib) set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkIOExport-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkIOExport-${CAMITK_VTK_VERSION}.lib)
set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkImagingStencil-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkImagingStencil-${CAMITK_VTK_VERSION}.lib) set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkImagingStencil-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkImagingStencil-${CAMITK_VTK_VERSION}.lib)
set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkIOImport-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkIOImport-${CAMITK_VTK_VERSION}.lib) set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkIOImport-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkIOImport-${CAMITK_VTK_VERSION}.lib)
set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkImagingMath-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkImagingMath-${CAMITK_VTK_VERSION}.lib) set(CAMITK_VTK_LIBRARIES ${CAMITK_VTK_LIBRARIES} debug ${VTK_LIBRARY_DIR}/vtkImagingMath-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkImagingMath-${CAMITK_VTK_VERSION}.lib)
# list of all core dependencies # list of all core dependencies
set(CAMITK_LIBRARIES set(CAMITK_LIBRARIES
${CAMITK_VTK_LIBRARIES} ${CAMITK_VTK_LIBRARIES}
...@@ -212,15 +209,15 @@ if (UNIX) ...@@ -212,15 +209,15 @@ if (UNIX)
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
endif() endif()
# Application man pages (always in section 1, this is an application...) # Application man pages (always in section 1, this is an application...)
set(CAMITK_APPLICATION_MAN_INSTALL_DIR "share/man/man1") set(CAMITK_APPLICATION_MAN_INSTALL_DIR "share/man/man1")
# Desktop file always in share/applications (freedesktop standard) # Desktop file always in share/applications (freedesktop standard)
set(CAMITK_APPLICATION_DESKTOP_INSTALL_DIR "share/applications") set(CAMITK_APPLICATION_DESKTOP_INSTALL_DIR "share/applications")
# icons file always in pixmaps (should be xpm or svg) # icons file always in pixmaps (should be xpm or svg)
set(CAMITK_APPLICATION_PIXMAP_INSTALL_DIR "share/pixmaps") set(CAMITK_APPLICATION_PIXMAP_INSTALL_DIR "share/pixmaps")
endif() endif()
# rpath settings for linux # rpath settings for linux
# This settings allow running the exe from the build tree and running them from its install location # This settings allow running the exe from the build tree and running them from its install location
# without doing anything in particular. # without doing anything in particular.
...@@ -252,8 +249,7 @@ if("${isSystemDir}" STREQUAL "-1") ...@@ -252,8 +249,7 @@ if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}" "${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}/components"
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/actions" "${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/actions")
"${CMAKE_INSTALL_PREFIX}/lib/${CAMITK_SHORT_VERSION_STRING}/viewers")
endif() endif()
#-- update module path #-- update module path
...@@ -285,13 +281,13 @@ include(CamiTKMacros) ...@@ -285,13 +281,13 @@ include(CamiTKMacros)
include(CamiTKLog) include(CamiTKLog)
# TODO check this # TODO check this
# #
# # By default, validate all projects are build in the build/bin directory (no subfolders). # # By default, validate all projects are build in the build/bin directory (no subfolders).
# # Note that, subfolders for actions / components are added later. # # Note that, subfolders for actions / components are added later.
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR}) # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR})
# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR}) # set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR})
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR}) # set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR})
# #
# # Remove the Debug, Release subfolders in build/bin, natively created with Visual Studio # # Remove the Debug, Release subfolders in build/bin, natively created with Visual Studio
# if ( ${CMAKE_GENERATOR} MATCHES "Visual Studio") # MSVC compiler # if ( ${CMAKE_GENERATOR} MATCHES "Visual Studio") # MSVC compiler
# foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) # foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
...@@ -301,6 +297,6 @@ include(CamiTKLog) ...@@ -301,6 +297,6 @@ include(CamiTKLog)
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CAMITK_BIN_DIR} CACHE TYPE STRING) # set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CAMITK_BIN_DIR} CACHE TYPE STRING)
# endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) # endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
# endif(${CMAKE_GENERATOR} MATCHES "Visual Studio") # endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
# #
# # Create the Xml data for Project.xml description, fyi store in the global variable CAMITK_SUBPROJECTS # # Create the Xml data for Project.xml description, fyi store in the global variable CAMITK_SUBPROJECTS
# camitk_init_manifest_data() # camitk_init_manifest_data()
...@@ -44,8 +44,8 @@ macro(export_headers) ...@@ -44,8 +44,8 @@ macro(export_headers)
set(multiValueArgs "") set(multiValueArgs "")
cmake_parse_arguments(EXPORT_HEADER "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) cmake_parse_arguments(EXPORT_HEADER "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# Remove prefix for the destination directory # special case for components: remove prefix for the destination directory
string(REGEX REPLACE "^component-|^component_|^action-|^action_|^viewer-|^viewer_|^library_|^library-" "" EXPORT_HEADER_DESTINATION "${EXPORT_HEADER_COMPONENT}") string(REGEX REPLACE "^component-|^component_|^action-|^action_|^library_|^library-" "" EXPORT_HEADER_DESTINATION "${EXPORT_HEADER_COMPONENT}")
# #
# 1. Create the build-time directory tree # 1. Create the build-time directory tree
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#! #!
#! This macro keeps header files directories tree structure at installation. In other words, if your extension #! This macro keeps header files directories tree structure at installation. In other words, if your extension
#! has its header files located in subdirectories, this tree structure will be kept the same at installation. #! has its header files located in subdirectories, this tree structure will be kept the same at installation.
#! #!
#! Note that only file matching regex "*.h" in the source dir and subdir are considered headers. #! Note that only file matching regex "*.h" in the source dir and subdir are considered headers.
#! If you need to add other files, you need to use the HEADERS_TO_INSTALL option. #! If you need to add other files, you need to use the HEADERS_TO_INSTALL option.
#! #!
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#! \param COMPONENT (required) Name of the component to use. This is also the include subdirectory name #! \param COMPONENT (required) Name of the component to use. This is also the include subdirectory name
#! used for copying the file #! used for copying the file
#! \param GROUP (optional) Name of the group this install should be using group will be #! \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: #! Example invocation:
#! #!
...@@ -48,17 +48,17 @@ macro(camitk_install_all_headers) ...@@ -48,17 +48,17 @@ macro(camitk_install_all_headers)
set(oneValueArgs COMPONENT GROUP) set(oneValueArgs COMPONENT GROUP)
set(multiValueArgs "") set(multiValueArgs "")
cmake_parse_arguments(CAMITK_INSTALL_ALL_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) cmake_parse_arguments(CAMITK_INSTALL_ALL_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# #
# 1. Create the build-time directory tree # 1. Create the build-time directory tree
# #
# The base include directories # The base include directories
set(CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR ${CMAKE_BINARY_DIR}/include/${CAMITK_SHORT_VERSION_STRING}) set(CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR ${CMAKE_BINARY_DIR}/include/${CAMITK_SHORT_VERSION_STRING})
# Get action, component or library name without its prefix # Get action, component or library name without its prefix
set(CAMITK_INSTALL_ALL_HEADERS_TARGET_NAME ${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}) 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 # Check group directory
if(CAMITK_INSTALL_ALL_HEADERS_GROUP) if(CAMITK_INSTALL_ALL_HEADERS_GROUP)
...@@ -71,7 +71,7 @@ macro(camitk_install_all_headers) ...@@ -71,7 +71,7 @@ macro(camitk_install_all_headers)
VERBATIM VERBATIM
) )
endif() endif()
# Update base dirs # Update base dirs
set(CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR ${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${CAMITK_INSTALL_ALL_HEADERS_GROUP}) set(CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR ${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${CAMITK_INSTALL_ALL_HEADERS_GROUP})
endif() endif()
...@@ -84,13 +84,13 @@ macro(camitk_install_all_headers) ...@@ -84,13 +84,13 @@ macro(camitk_install_all_headers)
VERBATIM VERBATIM
) )
endif() endif()
# Update base dirs # Update base dirs
set(CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR ${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}) set(CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR ${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${CAMITK_INSTALL_ALL_HEADERS_COMPONENT})
# #
# 2. Install the file (build-time and install-time) # 2. Install the file (build-time and install-time)
# #
# get the list of headers # get the list of headers
file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ *.h) file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ *.h)
...@@ -98,7 +98,7 @@ macro(camitk_install_all_headers) ...@@ -98,7 +98,7 @@ macro(camitk_install_all_headers)
foreach(HEADER ${HEADERS}) foreach(HEADER ${HEADERS})
# Get the subdirectory name of the header # Get the subdirectory name of the header
string(REGEX MATCH ".*/" SUBDIR ${HEADER}) string(REGEX MATCH ".*/" SUBDIR ${HEADER})
# Create subdirectory if not already existing # Create subdirectory if not already existing
if(NOT EXISTS "${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${SUBDIR}" AND NOT CAMITK_INSTALL_ALL_HEADERS_${SUBDIR}) if(NOT EXISTS "${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${SUBDIR}" AND NOT CAMITK_INSTALL_ALL_HEADERS_${SUBDIR})
# Create directory at build time # Create directory at build time
...@@ -110,7 +110,7 @@ macro(camitk_install_all_headers) ...@@ -110,7 +110,7 @@ macro(camitk_install_all_headers)
) )
set(CAMITK_INSTALL_ALL_HEADERS_${SUBDIR} "CREATED") # To avoid creating the directory another time set(CAMITK_INSTALL_ALL_HEADERS_${SUBDIR} "CREATED") # To avoid creating the directory another time
endif() endif()
# Install header at build time # Install header at build time
add_custom_command( TARGET ${CAMITK_INSTALL_ALL_HEADERS_TARGET_NAME} add_custom_command( TARGET ${CAMITK_INSTALL_ALL_HEADERS_TARGET_NAME}
POST_BUILD POST_BUILD
...@@ -119,15 +119,16 @@ macro(camitk_install_all_headers) ...@@ -119,15 +119,16 @@ macro(camitk_install_all_headers)
VERBATIM VERBATIM
) )
endforeach() endforeach()
# Install time, copy all the .h directories structure # Install time, copy all the .h directories structure
foreach(HEADER ${HEADERS}) foreach(HEADER ${HEADERS})
# Get the subdirectory name of the header # Get the subdirectory name of the header
string(REGEX MATCH ".*/" SUBDIR ${HEADER}) string(REGEX MATCH ".*/" SUBDIR ${HEADER})
install(FILES ${HEADER} install(FILES ${HEADER}
DESTINATION include/${CAMITK_SHORT_VERSION_STRING}/${CAMITK_INSTALL_ALL_HEADERS_GROUP}/${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}/${SUBDIR} DESTINATION include/${CAMITK_SHORT_VERSION_STRING}/${CAMITK_INSTALL_ALL_HEADERS_GROUP}/${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}/${SUBDIR}
COMPONENT ${CAMITK_INSTALL_ALL_HEADERS_COMPONENT} COMPONENT ${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}
) )
endforeach() endforeach()
endmacro() endmacro()
...@@ -2,23 +2,22 @@ ...@@ -2,23 +2,22 @@
#! @ingroup group_sdk_cmake_camitk_cdash_projects #! @ingroup group_sdk_cmake_camitk_cdash_projects
#! #!
#! macro camitk_register_subproject adds a subproject definition for the CDash report #! macro camitk_register_subproject adds a subproject definition for the CDash report
#! #!
#! Subprojects in CDash shows configure/build/test information by subprojects. #! 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 corelib (only present in the SDK)
#! - the cep library (one subproject per library of the CEP) #! - the cep library (one subproject per library of the CEP)
#! - the application action (only present in the SDK for application actions) #! - the application action (only present in the SDK for application actions)
#! - the component (one subproject per component extension of the CEP) #! - the component (one subproject per component extension of the CEP)
#! - the action (one subproject per action 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) #! - the application (one subproject per application of the CEP)
#! #!
#! Note: application actions are special actions grouped into a specific action extension. #! Note: application actions are special actions grouped into a specific action extension.
#! This unique action extension is mandatory for any CamiTK application to run properly #! This unique action extension is mandatory for any CamiTK application to run properly
#! (they include basic actions such as "save", "open"...) #! (they include basic actions such as "save", "open"...)
#! #!
#! macro camitk_register_subproject is called to add one subproject and define: #! macro camitk_register_subproject is called to add one subproject and define:
#! - the target #! - the target
#! - and its dependencies (if any) #! - and its dependencies (if any)
#! #!
#! This macro should be called once for each corelib, cep library component, action, and application #! This macro should be called once for each corelib, cep library component, action, and application
...@@ -32,12 +31,11 @@ ...@@ -32,12 +31,11 @@
#! - CAMITK_APPLICATION_ACTION_SUBPROJECTS is the XML fragment describing the application actions (only found in the SDK) #! - 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_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_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 #! - CAMITK_APPLICATION_SUBPROJECTS is the XML Fragment describing applications created by the CEP
#! #!
#! Usage: #! Usage:
#! \code #! \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] #! [DEPENDENCIES dep1 dep2 dep3]
#! ) #! )
#! \endcode #! \endcode
...@@ -47,54 +45,47 @@ ...@@ -47,54 +45,47 @@
macro(camitk_register_subproject) macro(camitk_register_subproject)
set(options "") set(options "")
set(oneValueArgs ACTION COMPONENT VIEWER CEP_LIBRARY APPLICATION CORELIB) set(oneValueArgs ACTION COMPONENT CEP_LIBRARY APPLICATION CORELIB)
set(multiValueArgs DEPENDENCIES) set(multiValueArgs DEPENDENCIES)
cmake_parse_arguments(ADD_SUB_PROJECT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) cmake_parse_arguments(ADD_SUB_PROJECT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# #
# 1. get the subproject name and add it to the corresponding target list # 1. get the subproject name and add it to the corresponding target list
# #
# CORE LIBRARIES # CORE LIBRARIES
if(ADD_SUB_PROJECT_CORELIB) if(ADD_SUB_PROJECT_CORELIB)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CORELIB}) set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CORELIB})
endif() endif()
# LIBRARY # LIBRARY
if(ADD_SUB_PROJECT_CEP_LIBRARY) if(ADD_SUB_PROJECT_CEP_LIBRARY)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CEP_LIBRARY}) set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CEP_LIBRARY})
# Add the project to the corresponding list # Add the project to the corresponding list
set(CAMITK_CEP_LIBRARY_TARGETS ${CAMITK_CEP_LIBRARY_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of library targets" FORCE) set(CAMITK_CEP_LIBRARY_TARGETS ${CAMITK_CEP_LIBRARY_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of library targets" FORCE)
endif() endif()
# COMPONENTS # COMPONENTS
if(ADD_SUB_PROJECT_COMPONENT) if(ADD_SUB_PROJECT_COMPONENT)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_COMPONENT}) set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_COMPONENT})
# Add the project to the corresponding list # Add the project to the corresponding list
set(CAMITK_COMPONENT_TARGETS ${CAMITK_COMPONENT_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of component extension targets" FORCE) set(CAMITK_COMPONENT_TARGETS ${CAMITK_COMPONENT_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of component extension targets" FORCE)