1 # \param DESCRIPTION Some comments on what is this CEP package about 31 # CEP Packaging only works
for stand-alone CEP
32 if (NOT CAMITK_EXTENSION_PROJECT_SET)
35 set(oneValueArgs NAME VENDOR CONTACT DESCRIPTION LICENSE)
36 set(multiValueArgs
"")
37 cmake_parse_arguments(CAMITK_CEP_PACKAGING
"${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
40 # Clean list of targets by removing duplicates
41 # Those may appear
if configuring more than once (i.e. by manually clicking more than once on the
CMake configure
42 # button before generating
43 list(REMOVE_DUPLICATES CAMITK_ACTION_TARGETS)
44 list(REMOVE_DUPLICATES CAMITK_COMPONENT_TARGETS)
45 list(REMOVE_DUPLICATES CAMITK_CEP_LIBRARY_TARGETS)
46 list(REMOVE_DUPLICATES CAMITK_APPLICATION_TARGETS)
49 if(CAMITK_CEP_PACKAGING_NAME)
50 set(PACKAGING_NAME ${CAMITK_CEP_PACKAGING_NAME})
52 # package name is project name 53 set(PACKAGING_NAME ${CMAKE_PROJECT_NAME})
56 # simply name so that the custom target name or file does not contains any space and are all lowercase 57 string(REGEX REPLACE
" " "" ESCAPED_PACKAGING_NAME
"${PACKAGING_NAME}")
58 string(TOLOWER
"${ESCAPED_PACKAGING_NAME}" CPACK_PACKAGE_NAME)
60 # set version number in case cep does not give any values 61 if(CAMITK_CEP_PACKAGING_VERSION_MAJOR)
62 set(CPACK_PACKAGE_VERSION_MAJOR ${CAMITK_CEP_PACKAGING_VERSION_MAJOR})
64 set(CPACK_PACKAGE_VERSION_MAJOR ${CAMITK_VERSION_MAJOR})
66 if(CAMITK_CEP_PACKAGING_VERSION_MINOR)
67 set(CPACK_PACKAGE_VERSION_MINOR ${CAMITK_CEP_PACKAGING_VERSION_MINOR})
69 set(CPACK_PACKAGE_VERSION_MINOR ${CAMITK_VERSION_MINOR})
71 if(CAMITK_CEP_PACKAGING_VERSION_PATCH)
72 set(CPACK_PACKAGE_VERSION_PATCH ${CAMITK_CEP_PACKAGING_VERSION_PATCH})
74 set(CPACK_PACKAGE_VERSION_PATCH ${CAMITK_VERSION_PATCH})
78 if(CAMITK_CEP_PACKAGING_VENDOR)
79 set(CPACK_PACKAGE_VENDOR ${CAMITK_CEP_PACKAGING_VENDOR})
81 set(CPACK_PACKAGE_VENDOR
"Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525")
83 if (CAMITK_CEP_PACKAGING_CONTACT)
84 set(CPACK_PACKAGE_CONTACT ${CAMITK_CEP_PACKAGING_CONTACT})
86 set(CPACK_PACKAGE_CONTACT
"http://camitk.imag.fr")
90 if(EXISTS
"${CMAKE_CURRENT_SOURCE_DIR}/README")
91 set(CPACK_RESOURCE_FILE_README
"${CMAKE_CURRENT_SOURCE_DIR}/README")
93 if(EXISTS
"${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
94 set(CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
97 # applications / executable 98 set(EXECUTABLES_TO_PACKAGE)
99 foreach(APPLICATION_TARGET_NAME ${CAMITK_APPLICATION_TARGETS})
100 # name and label are the same
101 set(EXECUTABLES_TO_PACKAGE ${EXECUTABLES_TO_PACKAGE} ${APPLICATION_TARGET_NAME} ${APPLICATION_TARGET_NAME})
103 set(CPACK_PACKAGE_EXECUTABLES ${EXECUTABLES_TO_PACKAGE})
106 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CAMITK_CEP_PACKAGING_DESCRIPTION})
108 # Files to ignore during generation of the package
109 set(CPACK_SOURCE_IGNORE_FILES
120 "\\\\.kdevelop\\\\.pcs$" 122 ${CPACK_SOURCE_IGNORE_FILES}
125 set(CPACK_SOURCE_GENERATOR
"TGZ" "ZIP" )
127 # ---------------------------------- 128 # Unix packages (Ubuntu and Debian) 129 # ---------------------------------- 130 if (UNIX AND NOT WIN32)
131 message(STATUS
"Packaging ${CPACK_PACKAGE_NAME} for UNIX systems")
132 # Try to find architecture 133 execute_process(COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
134 string(STRIP
"${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)
135 # Try to find distro name and distro-specific arch 138 string(STRIP
"${LSB_ID}" LSB_ID)
139 string(STRIP
"${LSB_RELEASE}" LSB_RELEASE)
140 set(LSB_DISTRIB
"${LSB_ID}${LSB_RELEASE}")
142 set(LSB_DISTRIB
"unix")
143 endif(NOT LSB_DISTRIB)
144 message(STATUS
"Packager architecture : ${LSB_DISTRIB}")
149 PATHS
"/usr/bin" #Add paths here
153 message(STATUS
"Packaging deb using ${DPKG_PATH}: OK")
154 set(DPKG_FOUND
"YES")
159 # For Debian-based distribs we want to create DEB packages. 160 if(
"${LSB_DISTRIB}" MATCHES
"Ubuntu|Debian")
162 # We need to alter the architecture names as per distro rules 163 if(
"${CPACK_PACKAGE_ARCHITECTURE}" MATCHES
"i[3-6]86")
164 set(CPACK_PACKAGE_ARCHITECTURE i386)
166 if(
"${CPACK_PACKAGE_ARCHITECTURE}" MATCHES
"x86_64")
167 set(CPACK_PACKAGE_ARCHITECTURE amd64)
169 # Set the dependencies based on the distrib version 172 # Set the install location to "/usr" 173 # set(CAMITK_INSTALL_ROOT "/usr") # Set the CamiTK install root path in your CMake command line / GUI. 174 set(CPACK_PACKAGING_INSTALL_PREFIX
"/usr")
175 set(CPACK_PACKAGE_DEFAULT_LOCATION
"/usr")
176 set(CPACK_SET_DESTDIR TRUE)
178 # Dependencies depending on the Operating System.
180 if(
"${LSB_DISTRIB}" MATCHES
"Ubuntu11.10")
181 set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.6-qt4, libxerces-c3.1 ")
184 if(
"${LSB_DISTRIB}" MATCHES
"Ubuntu12.04")
185 set(LSB_DISTRIB
"Ubuntu12.xx")
186 set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
188 if("${LSB_DISTRIB}
" MATCHES "Ubuntu12.04.1
") 189 set(LSB_DISTRIB "Ubuntu12.xx
") 190 set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1
") 193 if("${LSB_DISTRIB}
" MATCHES "Ubuntu12.10
") 194 set(LSB_DISTRIB "Ubuntu12.xx
") 195 set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1
") 198 # TODO Debian dependencies (see CamiTKPackaging.cmake) 200 if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) 201 message(STATUS "Packaging
for ${LSB_DISTRIB} not supported yet.\nPlease
set deps in CamiTKCEPPackaging.cmake before packaging.
") 209 if(WIN32 AND NOT UNIX) 210 # ----------------------- 211 # NSIS Windows installer 212 # ----------------------- 214 # Update package name for windows release 215 set(LSB_DISTRIB "win32
") 216 set(CPACK_PACKAGE_ARCHITECTURE i386) 217 string(TOLOWER "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CAMITK_VER_NICKNAME}-${LSB_DISTRIB}
" CPACK_PACKAGE_FILE_NAME) 219 # Try to find Makensis on Linux distribution 220 find_program(MAKENSIS 226 set(ITK_ROOT_DIR "C:/dev/ITK/3.20.1
") 229 if ("${CMAKE_GENERATOR}
" MATCHES "MinGW Makefiles
") 230 # NSIS Windows installer 231 message(STATUS "Packaging nsis
using ${MAKENSIS} with MinGW compiler
") 233 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS 234 ##TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies) 235 ##get_prerequisites() is not well enough documented to justify the time investement - EP May 2011 236 ${QT_BINARY_DIR}/QtCore4.dll 237 ${QT_BINARY_DIR}/QtGui4.dll 238 ${QT_BINARY_DIR}/QtSvg4.dll 239 ${QT_BINARY_DIR}/QtXml4.dll 240 ${QT_BINARY_DIR}/QtNetwork4.dll 241 ${QT_BINARY_DIR}/QtSql4.dll 242 ${QT_BINARY_DIR}/QtWebKit4.dll 244 ${VTK_LIBRARY_DIRS}/libQVTK.dll 245 ${VTK_LIBRARY_DIRS}/libvtkCommon.dll 246 ${VTK_LIBRARY_DIRS}/libvtksys.dll 247 ${VTK_LIBRARY_DIRS}/libvtkFiltering.dll 248 ${VTK_LIBRARY_DIRS}/libvtkGraphics.dll 249 ${VTK_LIBRARY_DIRS}/libvtkHybrid.dll 250 ${VTK_LIBRARY_DIRS}/libvtkIO.dll 251 ${VTK_LIBRARY_DIRS}/libvtkImaging.dll 252 ${VTK_LIBRARY_DIRS}/libvtkRendering.dll 253 ${VTK_LIBRARY_DIRS}/libvtkVolumeRendering.dll 254 ${VTK_LIBRARY_DIRS}/libvtkverdict.dll 255 ${VTK_LIBRARY_DIRS}/libvtkDICOMParser.dll 256 ${VTK_LIBRARY_DIRS}/libvtkNetCDF.dll 257 ${VTK_LIBRARY_DIRS}/libvtkNetCDF_cxx.dll 258 ${VTK_LIBRARY_DIRS}/libvtkexpat.dll 259 ${VTK_LIBRARY_DIRS}/libvtkjpeg.dll 260 ${VTK_LIBRARY_DIRS}/libvtkmetaio.dll 261 ${VTK_LIBRARY_DIRS}/libvtkpng.dll 262 ${VTK_LIBRARY_DIRS}/libvtktiff.dll 263 ${VTK_LIBRARY_DIRS}/libvtkzlib.dll 264 ${VTK_LIBRARY_DIRS}/libvtkInfovis.dll 265 ${VTK_LIBRARY_DIRS}/libvtkfreetype.dll 266 ${VTK_LIBRARY_DIRS}/libvtkftgl.dll 267 ${VTK_LIBRARY_DIRS}/libvtkalglib.dll 268 ${VTK_LIBRARY_DIRS}/libvtklibxml2.dll 269 ${VTK_LIBRARY_DIRS}/libvtkViews.dll 270 ${VTK_LIBRARY_DIRS}/libvtkexoIIc.dll 271 ${VTK_LIBRARY_DIRS}/libvtkWidgets.dll 272 ${VTK_LIBRARY_DIRS}/vtkhdf5.dll 273 ${VTK_LIBRARY_DIRS}/vtkhdf5_hl.dll 274 ${VTK_LIBRARY_DIRS}/libLSDyna.dll 275 # Xerces-c dependency 276 # ${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll 277 # Libxml2 dependencies 278 # ${LIBXML2_INCLUDE_DIR}/../bin/iconv.dll 279 C:/dev/libxml2/2.8/bin/libxml2-2.dll 280 # ${LIBXML2_INCLUDE_DIR}/../bin/zlib1.dll 282 ${ITK_ROOT_DIR}/bin/libITKAlgorithms.dll 283 ${ITK_ROOT_DIR}/bin/libITKCommon.dll 284 ${ITK_ROOT_DIR}/bin/libITKBasicFilters.dll 285 ${ITK_ROOT_DIR}/lib/InsightToolkit/libitksys.dll 286 ${ITK_ROOT_DIR}/bin/libitkvnl.dll 287 ${ITK_ROOT_DIR}/bin/libitkvnl_algo.dll 288 ${ITK_ROOT_DIR}/bin/libITKIO.dll 289 ${ITK_ROOT_DIR}/bin/libitkv3p_lsqr.dll 290 ${ITK_ROOT_DIR}/bin/libitkv3p_netlib.dll 291 ${ITK_ROOT_DIR}/bin/libITKDICOMParser.dll 292 ${ITK_ROOT_DIR}/bin/libITKEXPAT.dll 293 ${ITK_ROOT_DIR}/bin/libitkgdcm.dll 294 ${ITK_ROOT_DIR}/bin/libitkjpeg8.dll 295 ${ITK_ROOT_DIR}/bin/libITKMetaIO.dll 296 ${ITK_ROOT_DIR}/bin/libITKniftiio.dll 297 ${ITK_ROOT_DIR}/bin/libITKNrrdIO.dll 298 ${ITK_ROOT_DIR}/bin/libitkpng.dll 299 ${ITK_ROOT_DIR}/bin/libitktiff.dll 300 ${ITK_ROOT_DIR}/bin/libitkzlib.dll 301 ${ITK_ROOT_DIR}/bin/libitkjpeg12.dll 302 ${ITK_ROOT_DIR}/bin/libitkjpeg16.dll 303 ${ITK_ROOT_DIR}/bin/libitkopenjpeg.dll 304 ${ITK_ROOT_DIR}/bin/libITKznz.dll 306 C:/dev/MinGW/bin/libgcc_s_dw2-1.dll 307 C:/dev/MinGW/bin/libstdc++-6.dll 308 C:/dev/MinGW/bin/mingwm10.dll 316 message(STATUS "Packaging nsis
using ${MAKENSIS} with MSVC compiler
") 318 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS 319 ##TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies) 320 ##get_prerequisites() is not well enough documented to justify the time investement - EP May 2011 322 ${QT_BINARY_DIR}/QtCore4.dll 323 ${QT_BINARY_DIR}/QtGui4.dll 324 ${QT_BINARY_DIR}/QtSvg4.dll 325 ${QT_BINARY_DIR}/QtXml4.dll 326 ${QT_BINARY_DIR}/QtNetwork4.dll 327 ${QT_BINARY_DIR}/QtSql4.dll 328 ${QT_BINARY_DIR}/QtWebKit4.dll 330 ${VTK_DIR}/../../bin/QVTK.dll 331 ${VTK_DIR}/../../bin/vtkCommon.dll 332 ${VTK_DIR}/../../bin/vtksys.dll 333 ${VTK_DIR}/../../bin/vtkFiltering.dll 334 ${VTK_DIR}/../../bin/vtkGraphics.dll 335 ${VTK_DIR}/../../bin/vtkHybrid.dll 336 ${VTK_DIR}/../../bin/vtkIO.dll 337 ${VTK_DIR}/../../bin/vtkImaging.dll 338 ${VTK_DIR}/../../bin/vtkRendering.dll 339 ${VTK_DIR}/../../bin/vtkVolumeRendering.dll 340 ${VTK_DIR}/../../bin/vtkverdict.dll 341 ${VTK_DIR}/../../bin/vtkDICOMParser.dll 342 ${VTK_DIR}/../../bin/vtkNetCDF.dll 343 ${VTK_DIR}/../../bin/vtkNetCDF_cxx.dll 344 ${VTK_DIR}/../../bin/vtkexpat.dll 345 ${VTK_DIR}/../../bin/vtkjpeg.dll 346 ${VTK_DIR}/../../bin/vtkmetaio.dll 347 ${VTK_DIR}/../../bin/vtkpng.dll 348 ${VTK_DIR}/../../bin/vtktiff.dll 349 ${VTK_DIR}/../../bin/vtkzlib.dll 350 ${VTK_DIR}/../../bin/vtkInfovis.dll 351 ${VTK_DIR}/../../bin/vtkfreetype.dll 352 ${VTK_DIR}/../../bin/vtkftgl.dll 353 ${VTK_DIR}/../../bin/vtkalglib.dll 354 ${VTK_DIR}/../../bin/vtklibxml2.dll 355 ${VTK_DIR}/../../bin/vtkViews.dll 356 ${VTK_DIR}/../../bin/vtkexoIIc.dll 357 ${VTK_DIR}/../../bin/vtkWidgets.dll 358 ${VTK_DIR}/../../bin/vtkhdf5.dll 359 ${VTK_DIR}/../../bin/vtkhdf5_hl.dll 360 ${VTK_DIR}/../../bin/LSDyna.dll 361 # Xerces-c dependency 362 ${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll 363 # Libxml2 dependencies 364 ${LIBXML2_INCLUDE_DIR}/../bin/iconv.dll 365 ${LIBXML2_INCLUDE_DIR}/../bin/libxml2.dll 366 ${LIBXML2_INCLUDE_DIR}/../bin/zlib1.dll 368 ${ITK_DIR}/../../bin/ITKCommon.dll 372 # Copy those dependencies DLLs if packaging on Windows. 374 include(InstallRequiredSystemLibraries) 378 set(CAMITK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\core\\\\resources\\\\appIcon.ico
") #set here the current icon for CamiTK apps 379 set(CPACK_PACKAGE_ICON ${CAMITK_PACKAGE_ICON}) #icon for the top bar NSIS installer 380 set(CPACK_NSIS_MUI_ICON ${CAMITK_PACKAGE_ICON}) #icon for the generated install program (the .exe to run to install CamiTK). 381 set(CPACK_NSIS_MUI_UNIICON ${CAMITK_PACKAGE_ICON}) #icon for the generated uninstall program (the .exe to run to uninstall CamiTK). 385 set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME} ${CAMITK_VERSION_MAJOR}.${CAMITK_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
") 386 set(CPACK_NSIS_INSTALLED_ICON_NAME ${CPACK_PACKAGE_NAME}) 388 set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) 389 set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\camitk.imag.fr
") 390 set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\camitk.imag.fr
") 391 set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT}) 392 include(InstallRequiredSystemLibraries) 394 message(STATUS "Can not find makensis: nsis packaging is not possible
") 404 set(CPACK_GENERATOR "PackageMaker
") 405 # Libraries are bundled directly 406 set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE) 408 set(MACOSX_BUNDLE_BUNDLE_NAME ${CPACK_PACKAGE_NAME}) 409 set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}) 410 set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}) 411 set(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}
") 417 # ---------------------------- 418 # CamiTK's own package (.cep) 419 # ---------------------------- 420 # TODO install a CEP in CamiTK 421 # TODO CamiTK Market Place 423 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) 425 set(CEP_PACKAGE_FILENAME "${CPACK_PACKAGE_FILE_NAME}.cep
") 427 set(CEP_PACKAGING_DIR "${CMAKE_BINARY_DIR}/CamiTKPackaging
") 429 add_custom_target(camitk-${CPACK_PACKAGE_NAME}-package 430 # configure for packaging 431 COMMAND ${CMAKE_COMMAND} -DPACKAGING_NSIS:BOOL=ON ${CMAKE_BINARY_DIR} 433 COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} 434 # clean CEP package structure 435 COMMAND ${CMAKE_COMMAND} -E remove_directory "${CEP_PACKAGING_DIR}
" 436 COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/${CEP_PACKAGE_FILENAME} 437 COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}
" 438 COMMAND ${CMAKE_COMMAND} -E make_directory "${CEP_PACKAGING_DIR}/share/${CAMITK_SHORT_VERSION_STRING}/cep
" 440 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/lib
" "${CEP_PACKAGING_DIR}/lib
" 441 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/bin
" "${CEP_PACKAGING_DIR}/bin
" 442 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/
include" "${CEP_PACKAGING_DIR}/
include" 443 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/share
" "${CEP_PACKAGING_DIR}/share
" 445 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/CEPPackageManifest.xml ${CEP_PACKAGING_DIR}/share/${CAMITK_SHORT_VERSION_STRING}/cep/${CPACK_PACKAGE_NAME}.xml 447 COMMAND ${CMAKE_COMMAND} -E tar cvj "${CMAKE_BINARY_DIR}/${CEP_PACKAGE_FILENAME}
" "${CEP_PACKAGING_DIR}
" 448 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 449 # configure back for normal build 450 COMMAND ${CMAKE_COMMAND} -DPACKAGING_NSIS:BOOL=OFF ${CMAKE_BINARY_DIR} 451 COMMENT "Building cep
package for ${CPACK_PACKAGE_NAME}"
456 execute_process(COMMAND "${CAMITK_DIR}/bin/camitk-config" "--time-stamp"
457 RESULT_VARIABLE CAMITK_CONFIG_TIMESTAMP_RETURN_CODE
458 OUTPUT_VARIABLE CAMITK_CONFIG_TIMESTAMP_OUTPUT
459 ERROR_VARIABLE CAMITK_CONFIG_TIMESTAMP_OUTPUT_ERROR
460 OUTPUT_STRIP_TRAILING_WHITESPACE
461 ERROR_STRIP_TRAILING_WHITESPACE
465 set(CEP_PACKAGE_MANIFEST_XML "<?xml version=\"1.0\"?>\n<cep>")
466 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <!-- CamiTK Extension Project Manifest File -->")
467 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <name>${CPACK_PACKAGE_NAME}</name>")
468 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <contact>${CAMITK_CEP_PACKAGING_CONTACT}</contact>")
469 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <description>${CAMITK_CEP_PACKAGING_DESCRIPTION}</description>")
470 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <license>${CAMITK_CEP_PACKAGING_LICENSE}</license>")
471 if (NOT CAMITK_CONFIG_TIMESTAMP_RETURN_CODE)
472 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <timeStamp>${CAMITK_CONFIG_TIMESTAMP_OUTPUT}</timeStamp>")
474 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <actions>")
475 foreach(TARGET_NAME_ITERATOR ${CAMITK_ACTION_TARGETS})
476 string(REPLACE "action-" "" TARGET_NAME ${TARGET_NAME_ITERATOR})
477 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <action>${TARGET_NAME}</action>")
479 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " </actions>")
480 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <components>")
481 foreach(TARGET_NAME_ITERATOR ${CAMITK_COMPONENT_TARGETS})
482 string(REPLACE "component-" "" TARGET_NAME ${TARGET_NAME_ITERATOR})
483 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <component>${TARGET_NAME}</component>")
485 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " </components>")
486 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <libraries>")
487 foreach(TARGET_NAME_ITERATOR ${CAMITK_CEP_LIBRARY_TARGETS})
488 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <library>${TARGET_NAME_ITERATOR}</library>")
490 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " </libraries>")
491 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <applications>")
492 foreach(TARGET_NAME_ITERATOR ${CAMITK_APPLICATION_TARGETS})
493 string(REPLACE "application-" "" TARGET_NAME ${TARGET_NAME_ITERATOR})
494 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " <application>${TARGET_NAME}</application>")
496 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} " </applications>")
497 set(CEP_PACKAGE_MANIFEST_XML ${CEP_PACKAGE_MANIFEST_XML} "</cep>")
498 # replace all "" by \n
499 string (REGEX REPLACE "([^\\]|^)" "\\1\n" CEP_PACKAGE_MANIFEST_XML_TMP "${CEP_PACKAGE_MANIFEST_XML}")
500 string (REGEX REPLACE "[\\](.)" "\\1" CEP_PACKAGE_MANIFEST_XML_TEXT "${CEP_PACKAGE_MANIFEST_XML_TMP}") #fixes escaping
502 file(WRITE ${CMAKE_BINARY_DIR}/CEPPackageManifest.xml ${CEP_PACKAGE_MANIFEST_XML_TEXT})
503 message(STATUS "Generated CEP manifest in CEPPackageManifest.xml")
506 endif() # Standalone CEP
A pseudo-namespace used to group CMake macros and functions.
const char * description
Definition: applications/cepgenerator/main.cpp:37
get_filename_component(OUTFILE ${CAMITK_TEST_PASS_FILE} NAME) set(CAMITK_TEST_COMMAND_OUTPUT_FILE $
This CMake file run a command that is supposed to produce an output file, and then compare this outpu...
Definition: CamiTKTestCompareFile.h:13
cmake modules macros camitk test endif() add_custom_target(camitk-ce-iwyu COMMAND $
Definition: CamiTKIncludeWhatYouUse.h:37
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:29
test result execute_process(COMMAND ${CMAKE_COMMAND} -E remove -f ${CAMITK_TEST_COMMAND_FILE} ${CAMITK_TEST_COMMAND_RESULT_FILE} ${CAMITK_TEST_COMMAND_OUTPUT_FILE} ${CAMITK_TEST_PASS_FILE_COMMAND_FILE} ${CAMITK_TEST_PASS_FILE_OUTPUT_FILE} ${CAMITK_TEST_PASS_FILE_RESULT_FILE}) file(WRITE $
Definition: CamiTKTestPassFile.h:21
if(${CMAKE_VERSION} VERSION_GREATER "3.3" OR ${CMAKE_VERSION} VERSION_EQUAL "3.3") option(CAMITK_INCLUDE_WHAT_YOU_USE "Enable the header analysis on you code
static void include(QRect &r, const QRect &rect)
Definition: canvas_typed/qtcanvas.cpp:98