33 "NEEDS_CEPDEFAULT_APPLICATIONDESCRIPTIONCONTACTNAMELICENSE" # possible lists
34 "ENABLED" # possible options
39 if(NOT DEFINED ${CEP_DIR_NAME}_CMAKE_NAME)
40 set(CEP_NAME ${CEP_DIR_NAME})
42 set(CEP_NAME ${${CEP_DIR_NAME}_CMAKE_NAME})
44 string(TOUPPER ${CEP_NAME} CEP_NAME_CMAKE)
46 #
if it is the first cmake run, create the
internal variable with a correct initial value (
false is
default)
47 if(NOT CEP_${CEP_NAME_CMAKE}_INTERNAL)
48 # add option to enable/disable
this CEP
49 if(${CEP_DIR_NAME}_CMAKE_ENABLED)
50 set(CEP_${CEP_NAME_CMAKE}_ENABLED TRUE)
52 set(CEP_${CEP_NAME_CMAKE}_ENABLED FALSE)
54 set(CEP_${CEP_NAME_CMAKE} ${CEP_${CEP_NAME_CMAKE}_ENABLED} CACHE BOOL
"Build CEP ${CEP_NAME}")
55 set(CEP_${CEP_NAME_CMAKE}_INTERNAL TRUE CACHE INTERNAL
"Is variable CAMITK_CEP_${CEP_NAME_CMAKE} already created?")
58 if(CEP_${CEP_NAME_CMAKE})
59 message(STATUS
"Building CEP ${CEP_NAME}")
63 if(NOT DEFINED ${CEP_DIR_NAME}_CMAKE_CONTACT)
64 message(FATAL_ERROR
"In camitk_extension_project(...) for CEP \"${CEP_NAME}\": CONTACT argument is mandatory\n Should give the email address of the person(s) to contact for more information about the CEP \"${CEP_NAME}\"")
67 if(NOT DEFINED ${CEP_DIR_NAME}_CMAKE_LICENSE)
68 set(${CEP_NAME}_LICENSE
"LGPL-v3")
70 set(${CEP_NAME}_LICENSE ${${CEP_DIR_NAME}_CMAKE_LICENSE})
74 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
76 # init cep sub project
79 # packaging macro must be called before parsing extensions CMakeList files.
81 CONTACT ${${CEP_DIR_NAME}_CMAKE_CONTACT}
83 LICENSE ${${CEP_NAME}_LICENSE}
93 # CEP packaging (only works if this is a stand-alone CEP
96 # For Microsoft Visual C++, sets the default application for the "ALL_BUILD" project
97 # (i.e. launches imp when we you click on "Debug" or "Start Without Debugging" button on Visual)
98 # In addition, but not the least, sets the environment to the debug dll directory for VTK (and ITK)
99 # to solve the dll incompatibility between debug and relase version of QVTK.dll and ITKCommon.dll
100 # is there a specifi application to run by default
101 if(${CEP_NAME_CMAKE}_CMAKE_DEFAULT_APPLICATION)
102 set(CEP_DEFAULT_APPLICATION ${${CEP_NAME_CMAKE}_CMAKE_DEFAULT_APPLICATION})
104 set(CEP_DEFAULT_APPLICATION
"camitk-imp")
107 # if this is a single CEP, provides the installation facilities
108 # otherwise, just add include(CamiTKInstall) to get the installation facilities
109 if (NOT CAMITK_EXTENSION_PROJECT_SET)
110 #-- camitk_global_install == install in CAMITK_DIR
111 if (CAMITK_SDK_BUILD)
112 # if the SDK is currently being build => install in CMAKE_INSTALL_PREFIX
113 add_custom_target(${CEP_NAME}_global_install
114 # Second cmake to install
115 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install --config ${CMAKE_CFG_INTDIR}
116 COMMENT
"Global Installation in ${CMAKE_INSTALL_PREFIX}"
120 # this is called from a normal CEP build => install in CAMITK_DIR
121 add_custom_target(${CEP_NAME}_global_install
122 # First cmake to redefine install prefix
123 COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${CAMITK_DIR} ${CMAKE_BINARY_DIR}
124 # Second cmake to install
125 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install --config ${CMAKE_CFG_INTDIR}
126 COMMENT
"Global Installation in ${CAMITK_DIR}"
130 # camitk_local_install == install in User Config directory
131 add_custom_target(${CEP_NAME}_local_install
132 # First cmake to redefine install prefix
133 COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${CAMITK_USER_DIR} ${CMAKE_BINARY_DIR}
134 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install --config ${CMAKE_CFG_INTDIR}
135 COMMENT
"Local Installation in ${CAMITK_USER_DIR}"
DESCRIPTION
Definition: CamiTKCEPPackaging.cmake:34
n b or specify the CMake cache variable(e.g.modify the value directly in the cmake GUI\n or run cmake from the command line with-DCAMITK_DIR:PATH=...)\n c) or specify a CAMITK_DIR environment variable(system variable)\n d) or remove the version requirement in the CMakeLists.txt(e.g.use a simple\n\"find_package(CamiTK REQUIRED)\" without specifying the version)") else() set(CAMITK_VERSION_MESSAGE" (found suitable version \"$
Definition: FindCamiTK.cmake:187
camitk_sub_project_init()
MACRO camitk_sub_project_init initializes the xml_subprojects variable to gather CamiTK subprojects...
Definition: CamiTKSubProjectInit.h:10
camitk_cep_packaging()
CamiTK cep packaging allows you to build a package from a CEP If README and COPYRIGHT files exists at...
Definition: CamiTKCEPPackaging.h:28
config endif() if(EXISTS"$
Definition: FindCamiTK.cmake:76
CONTACT
Definition: CamiTKCEPPackaging.cmake:34
get_directory_name()
macro get_directory_name set the variable VariableName to the name of the last directory of FullPathD...
Definition: GetDirectoryName.h:14
camitk_sub_project_validate()
macro camitk_sub_project_validate validates the xml_subprojects variable by ending its xml tag i...
Definition: CamiTKSubProjectValidate.h:15
set(CAMITK_TEST_PLATEFORM ${Plateform}) set(CAMITK_SVN_SUBDIR $
Definition: CamiTKTestBuildMacros.cmake:15
camitk_extension_project()
macro add_cep creates an optional (disabled by default) CEP (CamiTK Extension Project) subdirectory t...
Definition: CamiTKExtensionProject.h:28
if(NOT DEFINED CTEST_SOURCE_DIRECTORY) message(FATAL_ERROR"Please provide the source directory of the continuous test with the CTEST_SOURCE_DIRECTORY argument") endif() if(NOT DEFINED CTEST_BINARY_DIRECTORY) message(FATAL_ERROR"Please provide the build directory of the continuous test with the CTEST_BINARY_DIRECTORY argument") endif() if(CAMITK_CONTINUOUS_INTEGRATION) string(REGEX REPLACE"^(.*)-.*-.*""\\1"COMPILER"$
Definition: continuous.cmake:21
message(STATUS"Looking for CamiTK ${CamiTK_FIND_VERSION}") set(CAMITK_FOUND FALSE) set(CAMITK_USE_FILE"CamiTKConfig.cmake") set(CAMITK_DIR_DESCRIPTION"directory containing a build tree or install tree of CamiTK.\n It must have the camitk-config binary in its 'bin' subdirectory.") if(WIN32) set(FIND_CAMITK_USER_BASE_DIR $ENV
Definition: FindCamiTK.cmake:54
camitk_add_subdirectory()
camitk_add_subdirectory is a utility macro that add a source subdirectory only if: ...
Definition: CamiTKAddSubDirectory.h:19
EXTENSION_NAME parse_arguments(${EXTENSION_NAME_CMAKE}#prefix"NEEDS_TOOL;NEEDS_CEP_LIBRARIES;NEEDS_COMPONENT_EXTENSION;NEEDS_ACTION_EXTENSION;INCLUDE_DIRECTORIES;EXTERNAL_LIBRARIES;HEADERS_TO_INSTALL;DEFINES;CXX_FLAGS;EXTERNAL_SOURCES;TARGET_NAME;CEP_NAME;DESCRIPTION;TEST_APPLICATION"#possible lists"NEEDS_QT_MODULES;ACTION_EXTENSION;COMPONENT_EXTENSION;DISABLED;NEEDS_XERCESC;NEEDS_ITK;NEEDS_LIBXML2;NEEDS_XSD;NEEDS_QTXML;NEEDS_OPENCV;NEEDS_IGSTK;INSTALL_ALL_HEADERS;NEEDS_GDCM;"#possible options ${ARGN}) if($
Definition: CamiTKExtension.cmake:82
string(REGEX REPLACE"^.*-(.*)-.*""\\1"ARCH"${CAMITK_CONTINUOUS_INTEGRATION}") string(REGEX REPLACE"^.*-.*-(.*)""\\1"BUILDTYPE"$
Definition: continuous.cmake:34