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}
82 DESCRIPTION ${${CEP_DIR_NAME}_CMAKE_DESCRIPTION}
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 # simply target name so that the custom target name does not contains any space 108 string(REGEX REPLACE
" " "" SIMPLIFIED_CEP_NAME ${CEP_NAME})
110 #
if this is a single CEP, provides the installation facilities
111 # otherwise, just add
include(CamiTKInstall) to
get the installation facilities
112 if (NOT CAMITK_EXTENSION_PROJECT_SET)
113 #-- camitk_global_install == install in CAMITK_DIR 114 if (CAMITK_SDK_BUILD)
115 # if the SDK is currently being build => install in CMAKE_INSTALL_PREFIX 116 add_custom_target(${SIMPLIFIED_CEP_NAME}_global_install
117 # Second cmake to install 118 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install --config ${CMAKE_CFG_INTDIR}
119 COMMENT
"Global Installation in ${CMAKE_INSTALL_PREFIX}" 123 # this is called from a normal CEP build => install in CAMITK_DIR 124 add_custom_target(${SIMPLIFIED_CEP_NAME}_global_install
125 # First cmake to redefine install prefix 126 COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${CAMITK_DIR} ${CMAKE_BINARY_DIR}
127 # Second cmake to install 128 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install --config ${CMAKE_CFG_INTDIR}
129 COMMENT
"Global Installation in ${CAMITK_DIR}" 133 # camitk_local_install == install in User Config directory 134 add_custom_target(${SIMPLIFIED_CEP_NAME}_local_install
135 # First cmake to redefine install prefix 136 COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${CAMITK_USER_DIR} ${CMAKE_BINARY_DIR}
137 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target install --config ${CMAKE_CFG_INTDIR}
138 COMMENT
"Local Installation in ${CAMITK_USER_DIR}" 142 # Add an update_translate targete to configure all the .qrc files for the different extensions of this CEP on demand. 143 # .qrc files consider up to date .ts resources files for translation 144 add_custom_target(${SIMPLIFIED_CEP_NAME}_updatetranslate
145 COMMAND ${CMAKE_COMMAND} -E echo
"Updating translation for ${CEP_NAME}" 146 COMMAND ${CMAKE_COMMAND} -DCAMITK_TRANSLATE=TRUE ${CMAKE_BINARY_DIR}
147 COMMAND ${CMAKE_COMMAND} -DCAMITK_TRANSLATE=FALSE ${CMAKE_BINARY_DIR}
148 COMMAND ${CMAKE_COMMAND} -E echo
"Translation updated for ${CEP_NAME}" camitk_sub_project_validate()
macro camitk_sub_project_validate validates the xml_subprojects variable by ending its xml tag i...
Definition: CamiTKSubProjectValidate.h:15
get_directory_name()
macro get_directory_name set the variable VariableName to the name of the last directory of FullPathD...
Definition: GetDirectoryName.h:14
parse_arguments()
macro parse_arguments is a fork from CMakeMacroParseArguments see http://www.cmake.org/Wiki/CMakeMacroParseArguments for more information
Definition: ParseArguments.h:13
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
set(CAMITK_TEST_COMMAND_FILE ${CAMITK_TEST_OUTPUT_DIR}/command) set(CAMITK_TEST_COMMAND_RESULT_FILE $
This CMake file run a command and put the output in a given file.
Definition: CamiTKTestPassFile.h:11
camitk_add_subdirectory()
camitk_add_subdirectory is a utility macro that add a source subdirectory only if: ...
Definition: CamiTKAddSubDirectory.h:19
camitk_extension_project()
macro camitk_extension_project creates an optional (disabled by default) CEP (CamiTK Extension Projec...
Definition: CamiTKExtensionProject.h:28
static void include(QRect &r, const QRect &rect)
Definition: canvas_typed/qtcanvas.cpp:98
camitk_sub_project_init()
MACRO camitk_sub_project_init initializes the xml_subprojects variable to gather CamiTK subprojects...
Definition: CamiTKSubProjectInit.h:10