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 742eb858 authored by promayon's avatar promayon
Browse files

FIXED macro spring cleaning (including .cmake renaming), using INTERNAL wherever possible

FIXED macro compatibility for CEP build (automatically detect core build vs CEP in multi CEP build vs CEP independant build, no more CEP options needed )

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@702 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 5ba77c6c
...@@ -26,7 +26,7 @@ include(${VTK_USE_FILE}) ...@@ -26,7 +26,7 @@ include(${VTK_USE_FILE})
# update module path # update module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CAMITK_SOURCE_DIR}/cmake/modules) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CAMITK_SOURCE_DIR}/cmake/modules)
# include CamiTK Internal Build environment # include CamiTK Internal Build environment
include(CamiTKInternalBuild) include(CamiTKCoreBuild)
# include CamiTK variables # include CamiTK variables
include(CamiTKVariables) include(CamiTKVariables)
# include CamiTK generic macros from CMAKE_MODULE_PATH directory # include CamiTK generic macros from CMAKE_MODULE_PATH directory
...@@ -43,7 +43,7 @@ include(CamiTKPackaging) ...@@ -43,7 +43,7 @@ include(CamiTKPackaging)
include(CreateLaunchers) include(CreateLaunchers)
# Create the Xml data for Project.xml description, fyi store in the global variable CAMITK_XML_PROJECT_DESCRIPTION # Create the Xml data for Project.xml description, fyi store in the global variable CAMITK_XML_PROJECT_DESCRIPTION
initXmlSubProject() camitk_sub_project_init()
# add all subprojects # add all subprojects
add_subdirectory(cmake) # rules for cmake install add_subdirectory(cmake) # rules for cmake install
...@@ -58,15 +58,15 @@ add_subdirectory(tools) ...@@ -58,15 +58,15 @@ add_subdirectory(tools)
# This file is needed for CDash to correctly update the Dashboard accordingly to the project # This file is needed for CDash to correctly update the Dashboard accordingly to the project
# Thus, CDash continuous integration dashboard is automatically updated when adding a new extension # Thus, CDash continuous integration dashboard is automatically updated when adding a new extension
# to CamiTK, using the corresponding macro # to CamiTK, using the corresponding macro
validateXmlSubProjects(${CAMITK_BUILD_DIR}) camitk_sub_project_validate(${CMAKE_BINARY_DIR})
# For Microsoft Visual C++, sets the default application to imp for the "ALL_BUILD" project # For Microsoft Visual C++, sets the default application to imp for the "ALL_BUILD" project
# (i.e. launches imp when we you click on "Debug" or "Start Without Debugging" button on Visual) # (i.e. launches imp when we you click on "Debug" or "Start Without Debugging" button on Visual)
# In addition, but not the least, sets the environment to the debug dll directory for VTK (and ITK) # In addition, but not the least, sets the environment to the debug dll directory for VTK (and ITK)
# to solve the dll incompatibility between debug and relase version of QVTK.dll and ITKCommon.dll # to solve the dll incompatibility between debug and relase version of QVTK.dll and ITKCommon.dll
if ( MSVC ) if ( MSVC )
create_default_target_launcher( create_default_target_launcher(
application-imp application-imp
RUNTIME_LIBRARY_DIRS "%VTK_DIR%/bin/$(OutDir)" "%ITK_DIR%/bin/$(OutDir)" RUNTIME_LIBRARY_DIRS "%VTK_DIR%/bin/$(OutDir)" "%ITK_DIR%/bin/$(OutDir)"
) )
endif( MSVC ) endif( MSVC )
# This module is defining build variables
# Set the installation directory, i.e where "make install" puts everything
# you can set the CAMITK_INSTALL_ROOT environment variable, set the cmake variable directly by
# adding -DCAMITK_INSTALL_ROOT:PATH=your-path-here to the cmake command
# or you can set CAMITK_INSTALL_ROOT by hand when running cmake (it is in the cache)
#
# If nothing is specified (or CAMITK_INSTALL_ROOT is blank), the default behaviour is to
# install everything in the directory on top of the source directory
set(CAMITK_INSTALL_ROOT_TEST "$ENV{CAMITK_INSTALL_ROOT}")
if (NOT CAMITK_INSTALL_ROOT_TEST)
set(CAMITK_INSTALL_ROOT_TEST ${CAMITK_INSTALL_ROOT})
if (NOT CAMITK_INSTALL_ROOT_TEST)
if (CAMITK_SOURCE_DIR)
set(CAMITK_INSTALL_ROOT ${CAMITK_SOURCE_DIR}/.. CACHE PATH "CamiTK installation root dir" FORCE)
# else()
# set(CAMITK_INSTALL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/.. CACHE PATH "CamiTK installation root dir" FORCE)
endif()
endif()
set (CMAKE_INSTALL_PREFIX ${CAMITK_INSTALL_ROOT} CACHE PATH "CamiTK installation root dir" FORCE)
else()
set (CMAKE_INSTALL_PREFIX $ENV{CAMITK_INSTALL_ROOT} CACHE PATH "CamiTK installation root dir" FORCE)
endif()
message(STATUS "CamiTK Installation Directory: ${CMAKE_INSTALL_PREFIX}")
# during compilation, set where everything (lib, exe, shared) goes
set (CAMITK_BUILD_DIR ${CMAKE_BINARY_DIR})
set (CAMITK_BIN_DIR ${CAMITK_BUILD_DIR}/bin CACHE PATH "CamiTK bin dir." FORCE)
set (CAMITK_LIB_DIR ${CAMITK_BUILD_DIR}/lib CACHE PATH "CamiTK lib dir." FORCE)
set (CAMITK_INCLUDE_DIR ${CAMITK_BUILD_DIR}/include CACHE PATH "CamiTK include dir." FORCE)
set (CAMITK_TESTDATA_DIR ${CAMITK_BUILD_DIR}/share/testdata CACHE PATH "CamiTK share dir. for test data" FORCE)
# the "normal" user does not need to see this
mark_as_advanced(CAMITK_BIN_DIR CAMITK_LIB_DIR CAMITK_INCLUDE_DIR CAMITK_TESTDATA_DIR)
# Setup output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR} CACHE PATH "Single directory for all runtimes." FORCE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR} CACHE PATH "Single directory for all dynamic/shared libs." FORCE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CAMITK_LIB_DIR} CACHE PATH "Single directory for all archives." FORCE)
# no need to see this
mark_as_advanced ( CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
# This module is only to be included when building CamiTK from source! # This module is only to be included when building CamiTK from source!
#
# It is to be included just BEFORE CamiTKVariables # It is to be included just BEFORE CamiTKVariables
# #
# --------------------------
# Project Name and Version
# --------------------------
set(CAMITK_PROJECT_NAME "CamiTK") set(CAMITK_PROJECT_NAME "CamiTK")
# Version (major, minor, patch) # Version (major, minor, patch)
...@@ -41,5 +46,45 @@ endif() ...@@ -41,5 +46,45 @@ endif()
message(STATUS "Welcome to ${CAMITK_VERSION_STRING}, enjoy your compilation!") message(STATUS "Welcome to ${CAMITK_VERSION_STRING}, enjoy your compilation!")
include(CamiTKBuild) # --------------------------
# build variables
# --------------------------
# Set the installation directory, i.e where "make install" puts everything
# you can set the CAMITK_INSTALL_ROOT environment variable, set the cmake variable directly by
# adding -DCAMITK_INSTALL_ROOT:PATH=your-path-here to the cmake command
# or you can set CAMITK_INSTALL_ROOT by hand when running cmake (it is in the cache)
#
# If nothing is specified (or CAMITK_INSTALL_ROOT is blank), the default behaviour is to
# install everything in the directory on top of the source directory
set(CAMITK_INSTALL_ROOT_TEST "$ENV{CAMITK_INSTALL_ROOT}")
if (NOT CAMITK_INSTALL_ROOT_TEST)
set(CAMITK_INSTALL_ROOT_TEST ${CAMITK_INSTALL_ROOT})
if (NOT CAMITK_INSTALL_ROOT_TEST)
if (CAMITK_SOURCE_DIR)
set(CAMITK_INSTALL_ROOT ${CAMITK_SOURCE_DIR}/../install CACHE PATH "CamiTK installation root dir" FORCE)
endif()
endif()
set (CMAKE_INSTALL_PREFIX ${CAMITK_INSTALL_ROOT} CACHE PATH "CamiTK installation root dir" FORCE)
else()
set (CMAKE_INSTALL_PREFIX $ENV{CAMITK_INSTALL_ROOT} CACHE PATH "CamiTK installation root dir" FORCE)
endif()
message(STATUS "CamiTK Installation Directory: ${CMAKE_INSTALL_PREFIX}")
# during compilation, set where everything (lib, exe, shared) goes
set (CAMITK_BIN_DIR ${CMAKE_BINARY_DIR}/bin CACHE PATH "CamiTK build bin dir." FORCE)
set (CAMITK_LIB_DIR ${CMAKE_BINARY_DIR}/lib CACHE PATH "CamiTK build lib dir." FORCE)
set (CAMITK_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include CACHE PATH "CamiTK build include dir." FORCE)
set (CAMITK_TESTDATA_DIR ${CMAKE_BINARY_DIR}/share/testdata CACHE PATH "CamiTK build share dir. for test data" FORCE)
# the "normal" user does not need to see this
mark_as_advanced(CAMITK_BIN_DIR CAMITK_LIB_DIR CAMITK_INCLUDE_DIR CAMITK_TESTDATA_DIR)
# Setup output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR} CACHE PATH "Single directory for all runtimes." FORCE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CAMITK_BIN_DIR} CACHE PATH "Single directory for all dynamic/shared libs." FORCE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CAMITK_LIB_DIR} CACHE PATH "Single directory for all archives." FORCE)
# no need to see this
mark_as_advanced ( CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#! [NAME packageName] #! [NAME packageName]
#! [VENDOR vendorName] #! [VENDOR vendorName]
#! [CONTACT contactName] #! [CONTACT contactName]
#! [APPLICATIONS appName1 appName2...]
#! ) #! )
#! \endcode #! \endcode
#! #!
...@@ -20,7 +19,12 @@ ...@@ -20,7 +19,12 @@
#! \param VENDOR (optional) Specify the vendor name (default is TIMC-IMAG) #! \param VENDOR (optional) Specify the vendor name (default is TIMC-IMAG)
#! \param CONTACT (optional) Specify the contact name (default is link to CamiTK website) #! \param CONTACT (optional) Specify the contact name (default is link to CamiTK website)
#! \param APPLICATIONS (optional) If you want to package some applications #! \param APPLICATIONS (optional) If you want to package some applications
#!
#! When configuring CMake, do not forget to set the CMAKE_INSTALL_PREFIX correctly (e.g., /usr on Linux)
#! It will always use the CamiTK install directory as install prefix (install where the core is already)
#!
#! To generate deb package add this to the cmake configuration line: -DCPACK_BINARY_DEB:BOOL=TRUE
#! To generate rpm package add this to the cmake configuration line: -DCPACK_BINARY_RPM:BOOL=TRUE
macro(camitk_cep_packaging) macro(camitk_cep_packaging)
# CEP Packaging only works for stand-alone CEP # CEP Packaging only works for stand-alone CEP
...@@ -41,9 +45,9 @@ else() ...@@ -41,9 +45,9 @@ else()
endif() endif()
string(TOLOWER ${PACKAGING_NAME} CPACK_PACKAGE_NAME) string(TOLOWER ${PACKAGING_NAME} CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_VERSION_MAJOR ${CAMITK_VER_MAJ}) set(CPACK_PACKAGE_VERSION_MAJOR ${CAMITK_VER_MAJ})
set(CPACK_PACKAGE_VERSION_MINOR "0") set(CPACK_PACKAGE_VERSION_MINOR ${CAMITK_VER_MIN})
set(CPACK_PACKAGE_VERSION_PATCH ${CAMITK_VER_PACKAGE_PAT}) set(CPACK_PACKAGE_VERSION_PATCH "0")
string(TOLOWER "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CAMITK_VER_NICKNAME}-${LSB_DISTRIB}_${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_FILE_NAME) string(TOLOWER "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${LSB_DISTRIB}_${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_FILE_NAME)
# contact information # contact information
if (CAMITK_CEP_PACKAGING_VENDOR) if (CAMITK_CEP_PACKAGING_VENDOR)
...@@ -61,19 +65,17 @@ endif() ...@@ -61,19 +65,17 @@ endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
endif() endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
endif() endif()
# applications / executable # applications / executable
if(CAMITK_CEP_PACKAGING_APPLICATIONS) set(EXECUTABLES_TO_PACKAGE)
set(EXECUTABLES_TO_PACKAGE) foreach(APPLICATION_TARGET_NAME ${CAMITK_APPLICATION_TARGETS})
foreach(APP_TO_PACKAGE ${CAMITK_CEP_PACKAGING_APPLICATIONS})
# name and label are the same # name and label are the same
set(EXECUTABLES_TO_PACKAGE ${EXECUTABLES_TO_PACKAGE} ${APP_TO_PACKAGE} ${APP_TO_PACKAGE}) set(EXECUTABLES_TO_PACKAGE ${EXECUTABLES_TO_PACKAGE} ${APPLICATION_TARGET_NAME} ${APPLICATION_TARGET_NAME})
endforeach() endforeach()
set(CPACK_PACKAGE_EXECUTABLES ${EXECUTABLES_TO_PACKAGE}) set(CPACK_PACKAGE_EXECUTABLES ${EXECUTABLES_TO_PACKAGE})
endif()
# package description # package description
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CAMITK_CEP_PACKAGING_DESCRIPTION}) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CAMITK_CEP_PACKAGING_DESCRIPTION})
...@@ -171,7 +173,7 @@ if (UNIX AND NOT WIN32) ...@@ -171,7 +173,7 @@ if (UNIX AND NOT WIN32)
# TODO Debian dependencies (see CamiTKPackaging.cmake) # TODO Debian dependencies (see CamiTKPackaging.cmake)
if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
message("Packaging for ${LSB_DISTRIB} not supported yet.\nPlease set deps in cmake/darktable-packaging.cmake before packaging.") message(STATUS "Packaging for ${LSB_DISTRIB} not supported yet.\nPlease set deps in cmake/darktable-packaging.cmake before packaging.")
endif() endif()
endif() endif()
...@@ -205,8 +207,8 @@ if(WIN32 AND NOT UNIX) ...@@ -205,8 +207,8 @@ if(WIN32 AND NOT UNIX)
# MinGW compiler # MinGW compiler
if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles") if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
# NSIS Windows installer # NSIS Windows installer
message(STATUS "Packaging nsis using ${MAKENSIS}") message(STATUS "Packaging nsis using ${MAKENSIS} with MinGW compiler")
# Qt dependencies
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
##TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies) ##TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies)
##get_prerequisites() is not well enough documented to justify the time investement - EP May 2011 ##get_prerequisites() is not well enough documented to justify the time investement - EP May 2011
...@@ -386,15 +388,92 @@ if(APPLE) ...@@ -386,15 +388,92 @@ if(APPLE)
set(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}") set(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}")
endif() endif()
# ------------------------------------- # -------------------------------------
# System and dependencies requirements # System and dependencies requirements
# ------------------------------------- # -------------------------------------
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)
# and here we go... # and here we go...
include(CPack) include(CPack)
# ----------------------------
# CamiTK's own package (.cep)
# ----------------------------
# TODO install a CEP in CamiTK
# TODO CamiTK Market Place
set(CEP_PACKAGING_DIR "${CMAKE_BINARY_DIR}/CamiTKExtensionPackage")
set(CEP_PACKAGE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.cep")
add_custom_target(camitk_extension_package
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/include" "${CEP_PACKAGING_DIR}/include/${CAMITK_SHORT_VERSION_STRING}"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/lib" "${CEP_PACKAGING_DIR}/lib/${CAMITK_SHORT_VERSION_STRING}"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/share" "${CEP_PACKAGING_DIR}/share/${CAMITK_SHORT_VERSION_STRING}"
COMMAND ${CMAKE_COMMAND} -E tar cvz "${CMAKE_BINARY_DIR}/${CEP_PACKAGE_NAME}" "${CEP_PACKAGING_DIR}/"
COMMENT "Building ${CEP_PACKAGE_NAME}"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
# Init CEP package directory structure
add_custom_target(camitk_extension_package_init
# build first
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}
# clean CEP package structure
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CEP_PACKAGING_DIR}"
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/${CEP_PACKAGE_NAME}
COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}/bin"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}/lib/${CAMITK_SHORT_VERSION_STRING}/actions"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}/lib/${CAMITK_SHORT_VERSION_STRING}/components"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}/share/${CAMITK_SHORT_VERSION_STRING}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}/include/${CAMITK_SHORT_VERSION_STRING}"
# We have no way to determine which files were
# produce by libs, therefore, we just remove everything we don't need
# 1. copy all bin to lib
# 2. move all actions to lib/${CAMITK_SHORT_VERSION_STRING} (see cep_packaging_actions)
# 3. move all components to lib/${CAMITK_SHORT_VERSION_STRING} (see cep_packaging_components)
# 4. remove all applications (see cep_packaging_${APPLICATION_TARGET_NAME} custom target)
# Step 1.
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/bin" "${CEP_PACKAGING_DIR}/lib"
COMMENT "Building CEP and packaging tools"
)
add_dependencies(camitk_extension_package camitk_extension_package_init)
# move all actions extension to lib/${CAMITK_SHORT_VERSION_STRING} subdir (see step 2. in camitk_extension_package_init)
if(CAMITK_ACTION_TARGETS)
add_custom_target(cep_packaging_actions
COMMAND ${CMAKE_COMMAND} -E rename "${CEP_PACKAGING_DIR}/lib/actions" "${CEP_PACKAGING_DIR}/lib/${CAMITK_SHORT_VERSION_STRING}/actions"
COMMENT "Packaging action extensions"
)
# cep_packaging_actions depends on camitk_extension_package_init...
add_dependencies(cep_packaging_actions camitk_extension_package_init)
# ...and we also need cep_packaging_actions to be done before camitk_extension_package
add_dependencies(camitk_extension_package cep_packaging_actions)
endif()
# move all components extension to lib/${CAMITK_SHORT_VERSION_STRING} subdir (see step 3. in camitk_extension_package_init)
if(CAMITK_COMPONENT_TARGETS)
add_custom_target(cep_packaging_components
COMMAND ${CMAKE_COMMAND} -E rename "${CEP_PACKAGING_DIR}/lib/components" "${CEP_PACKAGING_DIR}/lib/${CAMITK_SHORT_VERSION_STRING}/components"
COMMENT "Packaging component extensions"
)
add_dependencies(cep_packaging_components camitk_extension_package_init)
add_dependencies(camitk_extension_package cep_packaging_components)
endif()
# remove applications from libs (see step 4. in camitk_extension_package_init)
foreach(APPLICATION_TARGET_NAME ${CAMITK_APPLICATION_TARGETS})
string(REPLACE "application-" "" APPNAME ${APPLICATION_TARGET_NAME})
add_custom_target(cep_packaging_${APPLICATION_TARGET_NAME}
# remove the executable from lib
COMMAND ${CMAKE_COMMAND} -E copy ${CEP_PACKAGING_DIR}/lib/camitk-${APPNAME} ${CEP_PACKAGING_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E remove -f ${CEP_PACKAGING_DIR}/lib/camitk-${APPNAME}
COMMENT "Packaging ${APPLICATION_TARGET_NAME}"
)
add_dependencies(cep_packaging_${APPLICATION_TARGET_NAME} camitk_extension_package_init)
add_dependencies(camitk_extension_package cep_packaging_${APPLICATION_TARGET_NAME})
endforeach()
endif() # Standalone CEP endif() # Standalone CEP
endmacro() endmacro()
\ No newline at end of file
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# CamiTK packaging # CamiTK packaging
#------------------ #------------------
# Do not forget to change the version variables in CamiTKBuild.cmake # Do not forget to change the version variables in CamiTKInternalBuild.cmake
# #
# To make a source tar ball, just use the custom target camitk_package_source, e.g. "make camitk_package_source" # To make a source tar ball, just use the custom target camitk_package_source, e.g. "make camitk_package_source"
# #
......
...@@ -34,7 +34,7 @@ set(CAMITKCORE_LIBRARY_PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} ...@@ -34,7 +34,7 @@ set(CAMITKCORE_LIBRARY_PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES}
add_library(${CAMITK_CORE_LIB} SHARED ${${CAMITK_CORE_LIB}_SOURCES}) add_library(${CAMITK_CORE_LIB} SHARED ${${CAMITK_CORE_LIB}_SOURCES})
# Update XML Project description adding this target as a subproject of the main CamiTK project with # Update XML Project description adding this target as a subproject of the main CamiTK project with
# its dependencies (in the CMake target point of view) # its dependencies (in the CMake target point of view)
addSubProject(${CAMITK_CORE_LIB}) camitk_sub_project_add(CORELIB ${CAMITK_CORE_LIB})
# set the library specific info (SONAME...) # set the library specific info (SONAME...)
set_target_properties(${CAMITK_CORE_LIB} PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "") set_target_properties(${CAMITK_CORE_LIB} PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "")
......
...@@ -15,7 +15,7 @@ foreach(TOOL_NAME ${TOOLS_LIST}) ...@@ -15,7 +15,7 @@ foreach(TOOL_NAME ${TOOLS_LIST})
message(STATUS "Checking ${TOOL_NAME}") message(STATUS "Checking ${TOOL_NAME}")
# add option to enable/disable this tool # add option to enable/disable this tool
set(TOOL_${TOOL_NAME_CMAKE} FALSE CACHE BOOL "Build tool ${TOOL_NAME}") set(TOOL_${TOOL_NAME_CMAKE} FALSE CACHE BOOL "Build tool ${TOOL_NAME}")
set(CAMITK_TOOL_${TOOL_NAME_CMAKE}_INTERNAL TRUE CACHE BOOL "Is variable CAMITK_TOOL_${TOOL_NAME_CMAKE}_INTERNAL already created?") set(CAMITK_TOOL_${TOOL_NAME_CMAKE}_INTERNAL TRUE CACHE INTERNAL "Is variable CAMITK_TOOL_${TOOL_NAME_CMAKE}_INTERNAL already created?")
mark_as_advanced(CAMITK_TOOL_${TOOL_NAME_CMAKE}_INTERNAL) mark_as_advanced(CAMITK_TOOL_${TOOL_NAME_CMAKE}_INTERNAL)
endif() endif()
endforeach() endforeach()
......
...@@ -43,7 +43,7 @@ if(NOT PML_TOOLS_INTERNAL) ...@@ -43,7 +43,7 @@ if(NOT PML_TOOLS_INTERNAL)
message(STATUS "Checking for pml tools") message(STATUS "Checking for pml tools")
# add option to enable/disable this pml tools # add option to enable/disable this pml tools
set(PML_TOOLS FALSE CACHE BOOL "Build all pml tools") set(PML_TOOLS FALSE CACHE BOOL "Build all pml tools")
set(PML_TOOLS_INTERNAL TRUE CACHE BOOL "Is PML_TOOLS already created?") set(PML_TOOLS_INTERNAL TRUE CACHE INTERNAL "Is PML_TOOLS already created?")
mark_as_advanced(PML_TOOLS_INTERNAL) mark_as_advanced(PML_TOOLS_INTERNAL)
endif() endif()
......
Markdown is supported
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