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

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 @@
# CamiTK Community Edition CEP Set
#
#--------------------------------------------
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.0)
project(camitkcommunityedition)
......
......@@ -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
}
......@@ -179,18 +175,12 @@ getExpectedValue() {
"Number of Action Extensions")
echo ${actionExtensionCount[$shortVersion]}
;;
"Number of Viewer Extensions")
echo ${viewerExtensionCount[$shortVersion]}
;;
"Number of File Extensions Supported")
echo ${fileExtensionCount[$shortVersion]}
;;
"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
......@@ -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/cepgenerator)
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}/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)
......@@ -71,7 +70,7 @@ if(APIDOC_SDK)
get_filename_component(doxygenDocFilename ${CMAKE_MACRO} NAME_WE)
file(WRITE ${CMAKE_BINARY_DIR}/doxygencmake/${doxygenDocFilename}.h ${doxygenDocWithName})
endforeach()
# Configure doxyfile, doxygen project configuration file.
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@")
# CamiTK short version name we are looking for
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)
# 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
......@@ -64,7 +64,7 @@ if(WIN32)
file(TO_CMAKE_PATH "${CAMITK_USER_BASE_DIR_WINDOWS}" CAMITK_USER_BASE_DIR)
else()
# (UNIX OR APPLE)
# $HOME/.config/MySoft/Star Runner.ini
# $HOME/.config/MySoft/Star Runner.ini
set(CAMITK_USER_BASE_DIR "$ENV{HOME}/.config")
endif()
set(CAMITK_USER_DIR "${CAMITK_USER_BASE_DIR}/CamiTK")
......@@ -100,7 +100,7 @@ if(PACKAGING_NSIS)
else()
set(CAMITK_CORE_TARGET_LIB_NAME library-${CAMITK_CORE_LIB_NAME})
endif()
# All the link directories
set(CAMITK_LINK_DIRECTORIES
# private and public libs (including bin dir for windows)
......@@ -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
${CAMITK_BUILD_PRIVATE_LIB_DIR}/actions
)
# List of directories where the compiler should look for CamiTK core headers as well
......@@ -136,7 +133,7 @@ set(CAMITK_INCLUDE_DIRECTORIES
${CAMITK_BUILD_INCLUDE_DIR}
${QT_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
......@@ -149,7 +146,7 @@ if(MSVC)
set(CAMITK_CORE_LIBRARIES optimized ${CAMITK_CORE_LIB_NAME}
debug ${CAMITK_CORE_LIB_NAME}${CAMITK_DEBUG_POSTFIX}
)
# Construct list of VTK libraries for linking
# CAMITK_VTK_LIBRARIES = VTK input libraries at linkage
foreach(VTK_LIBRARY ${VTK_LIBRARIES})
......@@ -171,13 +168,13 @@ if(MSVC)
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)
endforeach()
# 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}/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}/vtkImagingMath-${CAMITK_VTK_VERSION}${CAMITK_DEBUG_POSTFIX}.lib optimized ${VTK_LIBRARY_DIR}/vtkImagingMath-${CAMITK_VTK_VERSION}.lib)
# list of all core dependencies
set(CAMITK_LIBRARIES
${CAMITK_VTK_LIBRARIES}
......@@ -212,15 +209,15 @@ if (UNIX)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
# 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)
set(CAMITK_APPLICATION_DESKTOP_INSTALL_DIR "share/applications")
# icons file always in pixmaps (should be xpm or svg)
set(CAMITK_APPLICATION_PIXMAP_INSTALL_DIR "share/pixmaps")
endif()
# rpath settings for linux
# This settings allow running the exe from the build tree and running them from its install location
# without doing anything in particular.
......@@ -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
......@@ -285,13 +281,13 @@ include(CamiTKMacros)
include(CamiTKLog)
# TODO check this
#
#
# # By default, validate all projects are build in the build/bin directory (no subfolders).
# # Note that, subfolders for actions / components are added later.
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR})
# set(CMAKE_LIBRARY_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
# if ( ${CMAKE_GENERATOR} MATCHES "Visual Studio") # MSVC compiler
# foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
......@@ -301,6 +297,6 @@ include(CamiTKLog)
# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CAMITK_BIN_DIR} CACHE TYPE STRING)
# endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
# endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
#
#
# # Create the Xml data for Project.xml description, fyi store in the global variable CAMITK_SUBPROJECTS
# camitk_init_manifest_data()
......@@ -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
......
......@@ -11,7 +11,7 @@
#!
#! 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.
#!
#!
#! 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.
#!
......@@ -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:
#!
......@@ -48,17 +48,17 @@ macro(camitk_install_all_headers)
set(oneValueArgs COMPONENT GROUP)
set(multiValueArgs "")
cmake_parse_arguments(CAMITK_INSTALL_ALL_HEADERS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
#
# 1. Create the build-time directory tree
#
# The base include directories
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
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)
......@@ -71,7 +71,7 @@ macro(camitk_install_all_headers)
VERBATIM
)
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})
endif()
......@@ -84,13 +84,13 @@ macro(camitk_install_all_headers)
VERBATIM
)
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})
#
#
# 2. Install the file (build-time and install-time)
#
# get the list of headers
file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ *.h)
......@@ -98,7 +98,7 @@ macro(camitk_install_all_headers)
foreach(HEADER ${HEADERS})
# Get the subdirectory name of the header
string(REGEX MATCH ".*/" SUBDIR ${HEADER})
# Create subdirectory if not already existing
if(NOT EXISTS "${CAMITK_INSTALL_ALL_HEADERS_BUILD_BASE_DIR}/${SUBDIR}" AND NOT CAMITK_INSTALL_ALL_HEADERS_${SUBDIR})
# Create directory at build time
......@@ -110,7 +110,7 @@ macro(camitk_install_all_headers)
)
set(CAMITK_INSTALL_ALL_HEADERS_${SUBDIR} "CREATED") # To avoid creating the directory another time
endif()
# Install header at build time
add_custom_command( TARGET ${CAMITK_INSTALL_ALL_HEADERS_TARGET_NAME}
POST_BUILD
......@@ -119,15 +119,16 @@ macro(camitk_install_all_headers)
VERBATIM
)
endforeach()
# Install time, copy all the .h directories structure
foreach(HEADER ${HEADERS})
# Get the subdirectory name of the header
string(REGEX MATCH ".*/" SUBDIR ${HEADER})
install(FILES ${HEADER}
DESTINATION include/${CAMITK_SHORT_VERSION_STRING}/${CAMITK_INSTALL_ALL_HEADERS_GROUP}/${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}/${SUBDIR}
COMPONENT ${CAMITK_INSTALL_ALL_HEADERS_COMPONENT}
)
)
endforeach()
endmacro()
......@@ -2,23 +2,22 @@
#! @ingroup group_sdk_cmake_camitk_cdash_projects
#!
#! 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.
#! This unique action extension is mandatory for any CamiTK application to run properly
#! (they include basic actions such as "save", "open"...)
#!
#!
#! macro camitk_register_subproject is called to add one subproject and define:
#! - the target
#! - the target
#! - and its dependencies (if any)
#!
#! This macro should be called once for each corelib, cep library component, action, and application
......@@ -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,54 +45,47 @@
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} )
#
# 1. get the subproject name and add it to the corresponding target list
#
# CORE LIBRARIES
if(ADD_SUB_PROJECT_CORELIB)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CORELIB})
endif()
# LIBRARY
if(ADD_SUB_PROJECT_CEP_LIBRARY)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_CEP_LIBRARY})
# 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)
endif()
# COMPONENTS
if(ADD_SUB_PROJECT_COMPONENT)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_COMPONENT})
# 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)
endif()
# ACTIONS
if(ADD_SUB_PROJECT_ACTION)
set(SUB_PROJECT_NAME ${ADD_SUB_PROJECT_ACTION})
# Add the project to the corresponding list
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})
# Add the project to the corresponding list
set(CAMITK_APPLICATION_TARGETS ${CAMITK_APPLICATION_TARGETS} ${SUB_PROJECT_NAME} CACHE STRING "List of application targets" FORCE)
endif()
#
# 2. Create the XML fragment (including name and dependency list
#
......@@ -106,10 +97,10 @@ macro(camitk_register_subproject)
# concatenate all dependencies
foreach(DEPENDENCY ${ADD_SUB_PROJECT_DEPENDENCIES})
set(SUBPROJECT_XML_FRAGMENT ${SUBPROJECT_XML_FRAGMENT} "<Dependency name=\"${DEPENDENCY}\"/>")
endforeach()
endforeach()
endif()
set(SUBPROJECT_XML_FRAGMENT ${SUBPROJECT_XML_FRAGMENT} "</SubProject>")
#
# 3. add the project to the list of the CEP/CEP set subprojects
#
......@@ -123,17 +114,17 @@ macro(camitk_register_subproject)
if(ADD_SUB_PROJECT_CORELIB)
set(CAMITK_CORE_LIBRARY_SUBPROJECTS ${CAMITK_CORE_LIBRARY_SUBPROJECTS} ${SUBPROJECT_XML_FRAGMENT} CACHE INTERNAL "XML description of Core library subprojects")
endif()
# LIBRARY
if(ADD_SUB_PROJECT_CEP_LIBRARY)
set(CAMITK_CEP_LIBRARY_SUBPROJECTS ${CAMITK_CEP_LIBRARY_SUBPROJECTS} ${SUBPROJECT_XML_FRAGMENT} CACHE INTERNAL "XML description of library subprojects")
endif()
# COMPONENTS
if(ADD_SUB_PROJECT_COMPONENT)
set(CAMITK_COMPONENT_SUBPROJECTS ${CAMITK_COMPONENT_SUBPROJECTS} ${SUBPROJECT_XML_FRAGMENT} CACHE INTERNAL "XML description of component extension subprojects")
endif()
# ACTIONS
if(ADD_SUB_PROJECT_ACTION)
# Particular case of action-applications
......@@ -143,16 +134,11 @@ macro(camitk_register_subproject)
set(CAMITK_ACTION_SUBPROJECTS ${CAMITK_ACTION_SUBPROJECTS} ${SUBPROJECT_XML_FRAGMENT} CACHE INTERNAL "XML description of action extension subprojects")
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
set(CAMITK_APPLICATION_SUBPROJECTS ${CAMITK_APPLICATION_SUBPROJECTS} ${SUBPROJECT_XML_FRAGMENT} CACHE INTERNAL "XML description of application subprojects")
endif()
endmacro()
......@@ -2,25 +2,24 @@
#! @ingroup group_sdk_cmake_camitk_cdash_projects
#!
#! MACRO camitk_init_manifest_data initializes the global variables that will
#! gather all the information about all the subprojects.
#! 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.
#! This unique action extension is mandatory for any CamiTK application to run properly
#! (they include basic actions such as "save", "open"...)
#!
#!
#! macro camitk_init_manifest_data is called only once per CEP or per CEP Set and
#! reset the global cache variables that are filled with XML fragment.
#!
#! The CAMITK_SUBPROJECTS variable is a XML document that concatenate all
#! The CAMITK_SUBPROJECTS variable is a XML document that concatenate all
#! these variable. CAMITK_SUBPROJECTS is used to produced the "Project.xml" file
#! in the build directory. The "Project.xml" file is send and later parse by CDash to
#! present Continuous Integration information by subproject.
......@@ -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.
......@@ -39,11 +37,10 @@
#!
#! This macro also clears all these global cache variables.
#! - CAMITK_CEP_LIBRARY_TARGETS
#! - CAMITK_COMPONENT_TARGETS
#! - CAMITK_ACTION_TARGETS
#! - CAMITK_VIEWER_TARGETS
#! - CAMITK_COMPONENT_TARGETS
#! - CAMITK_ACTION_TARGETS
#! - CAMITK_APPLICATION_TARGETS
#!
#!
#! usage:
#! \code
#! camitk_init_manifest_data()
......@@ -52,7 +49,7 @@ macro(camitk_init_manifest_data)
if(CAMITK_EXTENSION_PROJECT_SET)
if(NOT CAMITK_SUBPROJECTS)
# This is a call to camitk_init_manifest_data from the first CEP of a CEP Set
# This is a call to camitk_init_manifest_data from the first CEP of a CEP Set
camitk_init_manifest_data_reset_variables(${CAMITK_EXTENSION_PROJECT_SET_NAME})
endif()
# else: if CAMITK_SUBPROJECTS cache variable is defined, this means the variables were already reset
......@@ -60,7 +57,7 @@ macro(camitk_init_manifest_data)
# This is a call to camitk_init_manifest_data from a standalone CEP
camitk_init_manifest_data_reset_variables(${CMAKE_PROJECT_NAME})
endif()
endmacro()
# Intern macro to simplify camitk_init_manifest_data
......@@ -73,19 +70,17 @@ 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)
set(CAMITK_SUBPROJECTS "<?xml version=\"1.0\"?><Project name=\"${NAME}\">" CACHE INTERNAL "XML description of all subprojects")
set(CAMITK_SUBPROJECTS "<?xml version=\"1.0\"?><Project name=\"${NAME}\">" CACHE INTERNAL "XML description of all subprojects")
# Subprojects by category (XML fragment)
set(CAMITK_CORE_LIBRARY_SUBPROJECTS "" CACHE INTERNAL "XML description of core library subprojects")
set(CAMITK_CEP_LIBRARY_SUBPROJECTS "" CACHE INTERNAL "XML description of library subprojects")
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()
......@@ -44,7 +44,7 @@ macro(camitk_write_manifest_data)
# set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} " </SubProject>")
# set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${CAMITK_ACTION_SUBPROJECTS})
# set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${CAMITK_APPLICATION_SUBPROJECTS})
#
#
# # Add packaging source, packaging and api_doc target (COMMENTED > let's be frank, those are not compiled anymore on VMs)
# # set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} "\n <SubProject name=\"package-source\">\n </SubProject>")
# # set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} "\n <SubProject name=\"package\">\n </SubProject>")
......@@ -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()
......
......@@ -30,21 +30,20 @@ macro(camitk_cep_packaging)
# CEP Packaging only works for stand-alone CEP
if (NOT CAMITK_EXTENSION_PROJECT_SET)
set(options "")
set(oneValueArgs NAME VENDOR CONTACT DESCRIPTION LICENSE)
set(multiValueArgs "")
cmake_parse_arguments(CAMITK_CEP_PACKAGING "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# Clean list of targets by removing duplicates
# Those may appear if configuring more than once (i.e. by manually clicking more than once on the CMake configure
# Those may appear if configuring more than once (i.e. by manually clicking more than once on the CMake configure
# button before generating
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)
list(REMOVE_DUPLICATES CAMITK_VIEWER_TARGETS)
# package named
if(CAMITK_CEP_PACKAGING_NAME)
......@@ -195,7 +194,7 @@ if (UNIX AND NOT WIN32)
set(LSB_DISTRIB "Ubuntu12.xx")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
endif()
# TODO Debian dependencies (see CamiTKPackaging.cmake)
if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
......@@ -313,14 +312,14 @@ if(WIN32 AND NOT UNIX)