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

NEW CEP can now be package (tested source package only using "make package_source" in CEP builddir)


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@695 ec899d31-69d1-42ba-9299-647d76f65fb3
parent ac3092e8
#----------------------------
# CamiTK extension packaging
#---------------------------
# See also CamiTKPackaging.cmake
#!
#! \addtogroup CamiTKMacros
#!
#! CamiTK cep packaging allows you to build a package from a CEP
#! If README and COPYRIGHT files exists at top source dir, then
#! they will be included in the source package
#!
#! Usage:
#! \code
#! camitk_cep_packaging(DESCRIPTION "CEP package description"
#! [NAME packageName]
#! [VENDOR vendorName]
#! [CONTACT contactName]
#! [APPLICATIONS appName1 appName2...]
#! )
#! \endcode
#!
# \param DESCRIPTION Some comments on what is this CEP package about
#! \param NAME (optional) Specify the package name (default is project name)
#! \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 APPLICATIONS (optional) If you want to package some applications
macro(camitk_cep_packaging)
# CEP Packaging only works for stand-alone CEP
if (NOT CAMITK_MULTI_CEP)
parse_arguments(CAMITK_CEP_PACKAGING
"NAME;VENDOR;CONTACT;APPLICATIONS;DESCRIPTION" # possible lists
"" # possible option
${ARGN}
)
# package name and version
string(TOLOWER ${EXTENSION_NAME} CPACK_PACKAGE_NAME)
# package named
if (CAMITK_CEP_PACKAGING_NAME)
set(PACKAGING_NAME ${CAMITK_CEP_PACKAGING_NAME})
else()
# package name is project name
set(PACKAGING_NAME ${CMAKE_PROJECT_NAME})
endif()
string(TOLOWER ${PACKAGING_NAME} CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_VERSION_MAJOR ${CAMITK_VER_MAJ})
set(CPACK_PACKAGE_VERSION_MINOR ${CAMITK_VER_MIN})
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH ${CAMITK_VER_PACKAGE_PAT})
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)
# contact information
set(CPACK_PACKAGE_VENDOR "UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525")
set(CPACK_PACKAGE_CONTACT "http://camitk.imag.fr")
# # resource files
# set(CPACK_RESOURCE_FILE_README "${EXTENSION_NAME_SOURCE_DIR}/README")
# set(CPACK_RESOURCE_FILE_LICENSE "${EXTENSION_NAME_SOURCE_DIR}/COPYING")
if (CAMITK_CEP_PACKAGING_VENDOR)
set(CPACK_PACKAGE_VENDOR ${CAMITK_CEP_PACKAGING_VENDOR})
else()
set(CPACK_PACKAGE_VENDOR "UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525")
endif()
if (CAMITK_CEP_PACKAGING_CONTACT)
set(CPACK_PACKAGE_CONTACT ${CAMITK_CEP_PACKAGING_CONTACT})
else()
set(CPACK_PACKAGE_CONTACT "http://camitk.imag.fr")
endif()
# resource files
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
endif()
if (UNIX AND NOT WIN32)
set(CPACK_GENERATOR "DEB") # "RPM")
else()
set(CPACK_GENERATOR "NSIS")
# applications / executable
if(CAMITK_CEP_PACKAGING_APPLICATIONS)
set(EXECUTABLES_TO_PACKAGE)
foreach(APP_TO_PACKAGE ${CAMITK_CEP_PACKAGING_APPLICATIONS})
# name and label are the same
set(EXECUTABLES_TO_PACKAGE ${EXECUTABLES_TO_PACKAGE} ${APP_TO_PACKAGE} ${APP_TO_PACKAGE})
endforeach()
set(CPACK_PACKAGE_EXECUTABLES ${EXECUTABLES_TO_PACKAGE})
endif()
set(CPACK_SOURCE_GENERATOR "TGZ" "ZIP" )
# package description
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CAMITK_CEP_PACKAGING_DESCRIPTION})
# Files to ignore during generation of the package
set(CPACK_SOURCE_IGNORE_FILES
"~$"
"/CVS/"
"tags"
"/\\\\.svn/"
"/\\\\.git/"
"/kdev4$/"
"/build/"
"\\\\.kdevses$"
"\\\\.kdev4$"
"\\\\.kdevelop\\\\.pcs$"
".DS_Store"
${CPACK_SOURCE_IGNORE_FILES}
)
set(CPACK_SOURCE_GENERATOR "TGZ" "ZIP" )
# ----------------
# Debian packages
# ----------------
# ----------------------------------
# Unix packages (Ubuntu and Debian)
# ----------------------------------
if (UNIX AND NOT WIN32)
message(STATUS "Packaging CamiTK for UNIX systems")
message(STATUS "Packaging ${CPACK_PACKAGE_NAME} for UNIX systems")
# Try to find architecture
execute_process(COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
string(STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)
......@@ -74,23 +129,9 @@ if (UNIX AND NOT WIN32)
set(DPKG_FOUND "NO")
endif()
# For Debian-based distribs we want to create DEB packages.
if("${LSB_DISTRIB}" MATCHES "Ubuntu|Debian")
# make_directory(${CMAKE_BINARY_DIR}/packaging/debian)
# set(GTK_UPDATE_ICON_CACHE "gtk-update-icon-cache -f -t ${THEME_DIRECTORY}")
# configure_file( ${CMAKE_SOURCE_DIR}/cmake/debian/postinst.in ${CMAKE_BINARY_DIR}/packaging/debian/postinst )
# configure_file( ${CMAKE_SOURCE_DIR}/cmake/debian/prerm.in ${CMAKE_BINARY_DIR}/packaging/debian/prerm )
#
# set(CPACK_GENERATOR "DEB")
# set(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
# set(CPACK_DEBIAN_PACKAGE_SECTION "photos")
# set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "")
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/packaging/debian/postinst;${CMAKE_BINARY_DIR}/packaging/debian/prerm;" )
# We need to alter the architecture names as per distro rules
if("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "i[3-6]86")
set(CPACK_PACKAGE_ARCHITECTURE i386)
......@@ -107,9 +148,6 @@ if (UNIX AND NOT WIN32)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
set(CPACK_SET_DESTDIR TRUE)
# For building on a different system
# set(LSB_DISTRIB Ubuntu11.10)
# Dependencies depending on the Operating System.
# Ubuntu11.10
if("${LSB_DISTRIB}" MATCHES "Ubuntu11.10")
......@@ -117,20 +155,20 @@ if (UNIX AND NOT WIN32)
endif()
# For Ubuntu12.04
if("${LSB_DISTRIB}" MATCHES "Ubuntu12.04")
set(LSB_DISTRIB "Ubuntu12.xx")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
endif()
if("${LSB_DISTRIB}" MATCHES "Ubuntu12.04.1")
set(LSB_DISTRIB "Ubuntu12.xx")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
endif()
# For Ubuntu12.10
if("${LSB_DISTRIB}" MATCHES "Ubuntu12.10")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
set(LSB_DISTRIB "Ubuntu12.xx")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
endif()
# Debian
# if("${LSB_DISTRIB}" MATCHES "Debian5.*")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk2.0-0, libsqlite3-0, libglade2-0, libgegl-0.0-0, libcairo2, libexiv2-5, liblcms1, libjpeg62, libpng12-0, liblensfun0, liblensfun-data")
#
# endif("${LSB_DISTRIB}" MATCHES "Debian5.*")
# if("${LSB_DISTRIB}" MATCHES "Debiantesting")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk2.0-0, libsqlite3-0, libglade2-0, libgegl-0.0-0, libcairo2, libexiv2-5, liblcms1, libjpeg62, libpng12-0, liblensfun0, liblensfun-data")
# endif("${LSB_DISTRIB}" MATCHES "Debiantesting")
# TODO Debian dependencies (see CamiTKPackaging.cmake)
if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
message("Packaging for ${LSB_DISTRIB} not supported yet.\nPlease set deps in cmake/darktable-packaging.cmake before packaging.")
......@@ -139,76 +177,11 @@ if (UNIX AND NOT WIN32)
endif()
# package name
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)
# contact information
set(CPACK_PACKAGE_VENDOR "UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525")
set(CPACK_PACKAGE_CONTACT "http://camitk.imag.fr")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "CamiTK Developers <camitk-developers@lists.forge.imag.fr>")
# resource files
# set(CPACK_RESOURCE_FILE_README "${CAMITK_SOURCE_DIR}/README")
# set(CPACK_RESOURCE_FILE_LICENSE "${CAMITK_SOURCE_DIR}/COPYRIGHT")
#set(CPACK_INSTALL_CMAKE_PROJECTS "???"
# information description
# set(CPACK_PACKAGE_DESCRIPTION_FILE "${CAMITK_SOURCE_DIR}/README")
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CamiTK") #. Computer Assisted Medical Intervention Took Kit.")
# CamiTK is a C++ framework that helps researchers and clinicians to easily and rapidly collaborate in order to prototype CAMI applications, that feature medical images, surgical navigation and biomechanical simulations.")
# SET(CPACK_PACKAGE_DESCRIPTION "CamiTK is a C++ framework that helps researchers and clinicians to easily and rapidly collaborate in order to prototype CAMI applications, that feature medical images, surgical navigation and biomechanical simulations.")
# if(DPKG_FOUND)
# set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
# set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
# set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
# set(CPACK_SET_DESTDIR TRUE)
# #set(CPACK_INSTALLED_DIRECTORIES "${CAMITK_INSTALL_ROOT}/include" "usr/include")
# set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) # Change to your architecture here, there is no such thing as i686 in deb!
# # TODO update list of dependencies
# message(STATUS "Variable LSB_DISTRIB = ${LSB_DISTRIB} ")
# # For Ubuntu10.04
# if("${LSB_DISTRIB}" MATCHES "Ubuntu10.04")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libinsighttoolkit3.16 ( >= 3.16.0-1 ), libxml2, libvtk5.2-qt4")
# endif("${LSB_DISTRIB}" MATCHES "Ubuntu10.04")
# # For Ubuntu10.10
# if("${LSB_DISTRIB}" MATCHES "Ubuntu10.10")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libinsighttoolkit3.18, libxml2, libvtk5.4-qt4")
# endif("${LSB_DISTRIB}" MATCHES "Ubuntu10.10")
# # For Ubuntu11.04
# if("${LSB_DISTRIB}" MATCHES "Ubuntu11.04")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libinsighttoolkit3.18, libxml2, libvtk5.4-qt4 ")
# endif("${LSB_DISTRIB}" MATCHES "Ubuntu11.04")
# # For Ubuntu11.04
#
# endif()
# # -------------
# # RPM packages
# # -------------
# # TODO test rpm packaging
# find_program(RPMBUILD
# NAMES rpmbuild
# PATHS "/usr/bin"
# )
#
# if ( RPMBUILD )
# get_filename_component(RPMBUILD_PATH ${RPMBUILD} ABSOLUTE)
# message(STATUS "Packaging rpm using ${RPMBUILD_PATH}: OK")
# set(RPMBUILD_FOUND "YES")
# else ()
# SET(RPMBUILD_FOUND "NO")
# endif()
#
# if(RPMBUILD_FOUND AND NOT WIN32)
# set(CPACK_SET_DESTDIR TRUE)
# endif(RPMBUILD_FOUND AND NOT WIN32)
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)
endif()
endif()
if(WIN32 AND NOT UNIX)
# -----------------------
......@@ -227,109 +200,167 @@ if(WIN32 AND NOT UNIX)
)
if(MAKENSIS)
set(ITK_ROOT_DIR "C:/dev/ITK/3.20.1")
# MinGW compiler
if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
# NSIS Windows installer
message(STATUS "Packaging nsis using ${MAKENSIS}")
# IMPORTANT !!!
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backslashes.
# include(GetPrerequisites)
# set(TARGET_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug)
# set(PREREQ "")
# get_prerequisites(${CAMITK_BIN_DIR}/Debug/camitk-imp.exe PREREQ 1 1 ${CAMITK_BIN_DIR} ${VTK_LIBRARY_DIRS}/Release)
# get_prerequisites(${TARGET_DIR}/${EXECNAME}.exe" PREREQ 0 1 ${TARGET_DIR} "")
# Get the list of shared library files required by <target>. The list
# in the variable named <prerequisites_var> should be empty on first
# entry to this function. On exit, <prerequisites_var> will contain the
# list of required shared library files.
# <target> is the full path to an executable file. <prerequisites_var>
# is the name of a CMake variable to contain the results.
# <exclude_system> must be 0 or 1 indicating whether to include or
# exclude "system" prerequisites. If <recurse> is set to 1 all
# prerequisites will be found recursively, if set to 0 only direct
# prerequisites are listed. <exepath> is the path to the top level
# executable used for @executable_path replacment on the Mac. <dirs> is
# a list of paths where libraries might be found: these paths are
# searched first when a target without any path info is given. Then
# standard system locations are also searched: PATH, Framework
# locations, /usr/lib...
#message(STATUS "PREREQ=${PREREQ}")
#set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${PREREQ})
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
##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
${QT_BINARY_DIR}/QtCore4.dll
${QT_BINARY_DIR}/QtGui4.dll
${QT_BINARY_DIR}/QtSvg4.dll
${QT_BINARY_DIR}/QtXml4.dll
${QT_BINARY_DIR}/QtNetwork4.dll
${QT_BINARY_DIR}/QtSql4.dll
${QT_BINARY_DIR}/QtWebKit4.dll
${VTK_LIBRARY_DIRS}/Release/QVTK.dll
${VTK_LIBRARY_DIRS}/Release/vtkCommon.dll
${VTK_LIBRARY_DIRS}/Release/vtksys.dll
${VTK_LIBRARY_DIRS}/Release/vtkFiltering.dll
${VTK_LIBRARY_DIRS}/Release/vtkGraphics.dll
${VTK_LIBRARY_DIRS}/Release/vtkHybrid.dll
${VTK_LIBRARY_DIRS}/Release/vtkIO.dll
${VTK_LIBRARY_DIRS}/Release/vtkImaging.dll
${VTK_LIBRARY_DIRS}/Release/vtkRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkVolumeRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkverdict.dll
${VTK_LIBRARY_DIRS}/Release/vtkDICOMParser.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF_cxx.dll
# ${VTK_LIBRARY_DIRS}/Release/vtkmesh.dll
${VTK_LIBRARY_DIRS}/Release/vtkexpat.dll
${VTK_LIBRARY_DIRS}/Release/vtkjpeg.dll
${VTK_LIBRARY_DIRS}/Release/vtkmetaio.dll
${VTK_LIBRARY_DIRS}/Release/vtkpng.dll
${VTK_LIBRARY_DIRS}/Release/vtktiff.dll
${VTK_LIBRARY_DIRS}/Release/vtkzlib.dll
${VTK_LIBRARY_DIRS}/Release/vtkInfovis.dll
# ${VTK_LIBRARY_DIRS}/Release/vtkQtChart.dll
${VTK_LIBRARY_DIRS}/Release/vtkfreetype.dll
${VTK_LIBRARY_DIRS}/Release/vtkftgl.dll
${VTK_LIBRARY_DIRS}/Release/vtkalglib.dll
${VTK_LIBRARY_DIRS}/Release/vtklibxml2.dll
${VTK_LIBRARY_DIRS}/Release/vtkViews.dll
${VTK_LIBRARY_DIRS}/Release/vtkexoIIc.dll
${VTK_LIBRARY_DIRS}/Release/vtkWidgets.dll
# Wizard dependencies
${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll
)
##ITK is required
# FIND_PACKAGE(ITK)
if (${ITK_FOUND})
message(pass ${VTK_LIBRARY_DIRS})
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${ITK_DIR}/bin/Release/ITKCommon.dll)
endif ()
# Application icon
set(CAMITK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\core\\\\resources\\\\appIcon.ico") #set here the current icon for CamiTK
set(CPACK_PACKAGE_ICON ${CAMITK_PACKAGE_ICON}) #icon for the top bar NSIS installer
set(CPACK_NSIS_MUI_ICON ${CAMITK_PACKAGE_ICON}) #icon for the generated install program (the .exe to run to install CamiTK).
set(CPACK_NSIS_MUI_UNIICON ${CAMITK_PACKAGE_ICON}) #icon for the generated uninstall program (the .exe to run to uninstall CamiTK).
# Create desktop icons, by forcing CPack to build an internal command, as 'set(CPACK_NSIS_MODIFY_PATH ON)' option setted in the additional page doesn't work.
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "CreateShortCut \\\"$DESKTOP\\\\${CAMITK_PROJECT_NAME}-imp.lnk\\\" \\\"$INSTDIR\\\\bin\\\\imp.exe\\\"")
# Tell CPack to remove the icons after uninstalling
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Delete \\\"$DESKTOP\\\\${CAMITK_PROJECT_NAME}-imp.lnk\\\"")
${QT_BINARY_DIR}/QtCore4.dll
${QT_BINARY_DIR}/QtGui4.dll
${QT_BINARY_DIR}/QtSvg4.dll
${QT_BINARY_DIR}/QtXml4.dll
${QT_BINARY_DIR}/QtNetwork4.dll
${QT_BINARY_DIR}/QtSql4.dll
${QT_BINARY_DIR}/QtWebKit4.dll
# VTK dependencies
${VTK_LIBRARY_DIRS}/libQVTK.dll
${VTK_LIBRARY_DIRS}/libvtkCommon.dll
${VTK_LIBRARY_DIRS}/libvtksys.dll
${VTK_LIBRARY_DIRS}/libvtkFiltering.dll
${VTK_LIBRARY_DIRS}/libvtkGraphics.dll
${VTK_LIBRARY_DIRS}/libvtkHybrid.dll
${VTK_LIBRARY_DIRS}/libvtkIO.dll
${VTK_LIBRARY_DIRS}/libvtkImaging.dll
${VTK_LIBRARY_DIRS}/libvtkRendering.dll
${VTK_LIBRARY_DIRS}/libvtkVolumeRendering.dll
${VTK_LIBRARY_DIRS}/libvtkverdict.dll
${VTK_LIBRARY_DIRS}/libvtkDICOMParser.dll
${VTK_LIBRARY_DIRS}/libvtkNetCDF.dll
${VTK_LIBRARY_DIRS}/libvtkNetCDF_cxx.dll
${VTK_LIBRARY_DIRS}/libvtkexpat.dll
${VTK_LIBRARY_DIRS}/libvtkjpeg.dll
${VTK_LIBRARY_DIRS}/libvtkmetaio.dll
${VTK_LIBRARY_DIRS}/libvtkpng.dll
${VTK_LIBRARY_DIRS}/libvtktiff.dll
${VTK_LIBRARY_DIRS}/libvtkzlib.dll
${VTK_LIBRARY_DIRS}/libvtkInfovis.dll
${VTK_LIBRARY_DIRS}/libvtkfreetype.dll
${VTK_LIBRARY_DIRS}/libvtkftgl.dll
${VTK_LIBRARY_DIRS}/libvtkalglib.dll
${VTK_LIBRARY_DIRS}/libvtklibxml2.dll
${VTK_LIBRARY_DIRS}/libvtkViews.dll
${VTK_LIBRARY_DIRS}/libvtkexoIIc.dll
${VTK_LIBRARY_DIRS}/libvtkWidgets.dll
${VTK_LIBRARY_DIRS}/vtkhdf5.dll
${VTK_LIBRARY_DIRS}/vtkhdf5_hl.dll
${VTK_LIBRARY_DIRS}/libLSDyna.dll
# Xerces-c dependency
# ${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll
# Libxml2 dependencies
# ${LIBXML2_INCLUDE_DIR}/../bin/iconv.dll
C:/dev/libxml2/2.8/bin/libxml2-2.dll
# ${LIBXML2_INCLUDE_DIR}/../bin/zlib1.dll
# ITK dependency
${ITK_ROOT_DIR}/bin/libITKCommon.dll
${ITK_ROOT_DIR}/bin/libITKBasicFilters.dll
${ITK_ROOT_DIR}/lib/InsightToolkit/libitksys.dll
${ITK_ROOT_DIR}/bin/libitkvnl.dll
${ITK_ROOT_DIR}/bin/libitkvnl_algo.dll
${ITK_ROOT_DIR}/bin/libITKIO.dll
${ITK_ROOT_DIR}/bin/libitkv3p_lsqr.dll
${ITK_ROOT_DIR}/bin/libitkv3p_netlib.dll
${ITK_ROOT_DIR}/bin/libITKDICOMParser.dll
${ITK_ROOT_DIR}/bin/libITKEXPAT.dll
${ITK_ROOT_DIR}/bin/libitkgdcm.dll
${ITK_ROOT_DIR}/bin/libitkjpeg8.dll
${ITK_ROOT_DIR}/bin/libITKMetaIO.dll
${ITK_ROOT_DIR}/bin/libITKniftiio.dll
${ITK_ROOT_DIR}/bin/libITKNrrdIO.dll
${ITK_ROOT_DIR}/bin/libitkpng.dll
${ITK_ROOT_DIR}/bin/libitktiff.dll
${ITK_ROOT_DIR}/bin/libitkzlib.dll
${ITK_ROOT_DIR}/bin/libitkjpeg12.dll
${ITK_ROOT_DIR}/bin/libitkjpeg16.dll
${ITK_ROOT_DIR}/bin/libitkopenjpeg.dll
${ITK_ROOT_DIR}/bin/libITKznz.dll
# MinGW Dependencies
C:/dev/MinGW/bin/libgcc_s_dw2-1.dll
C:/dev/MinGW/bin/libstdc++-6.dll
C:/dev/MinGW/bin/mingwm10.dll
)
endif()
# MSVC compiler
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio 9 2008")
message(STATUS "Packaging nsis using ${MAKENSIS} with MSVC compiler")
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
##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
# Qt dependencies
${QT_BINARY_DIR}/QtCore4.dll
${QT_BINARY_DIR}/QtGui4.dll
${QT_BINARY_DIR}/QtSvg4.dll
${QT_BINARY_DIR}/QtXml4.dll
${QT_BINARY_DIR}/QtNetwork4.dll
${QT_BINARY_DIR}/QtSql4.dll
${QT_BINARY_DIR}/QtWebKit4.dll
# VTK dependencies
${VTK_LIBRARY_DIRS}/Release/QVTK.dll
${VTK_LIBRARY_DIRS}/Release/vtkCommon.dll
${VTK_LIBRARY_DIRS}/Release/vtksys.dll
${VTK_LIBRARY_DIRS}/Release/vtkFiltering.dll
${VTK_LIBRARY_DIRS}/Release/vtkGraphics.dll
${VTK_LIBRARY_DIRS}/Release/vtkHybrid.dll
${VTK_LIBRARY_DIRS}/Release/vtkIO.dll
${VTK_LIBRARY_DIRS}/Release/vtkImaging.dll
${VTK_LIBRARY_DIRS}/Release/vtkRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkVolumeRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkverdict.dll
${VTK_LIBRARY_DIRS}/Release/vtkDICOMParser.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF_cxx.dll
${VTK_LIBRARY_DIRS}/Release/vtkexpat.dll
${VTK_LIBRARY_DIRS}/Release/vtkjpeg.dll
${VTK_LIBRARY_DIRS}/Release/vtkmetaio.dll
${VTK_LIBRARY_DIRS}/Release/vtkpng.dll
${VTK_LIBRARY_DIRS}/Release/vtktiff.dll
${VTK_LIBRARY_DIRS}/Release/vtkzlib.dll
${VTK_LIBRARY_DIRS}/Release/vtkInfovis.dll
${VTK_LIBRARY_DIRS}/Release/vtkfreetype.dll
${VTK_LIBRARY_DIRS}/Release/vtkftgl.dll
${VTK_LIBRARY_DIRS}/Release/vtkalglib.dll
${VTK_LIBRARY_DIRS}/Release/vtklibxml2.dll
${VTK_LIBRARY_DIRS}/Release/vtkViews.dll
${VTK_LIBRARY_DIRS}/Release/vtkexoIIc.dll
${VTK_LIBRARY_DIRS}/Release/vtkWidgets.dll
${VTK_LIBRARY_DIRS}/Release/vtkhdf5.dll
${VTK_LIBRARY_DIRS}/Release/vtkhdf5_hl.dll
${VTK_LIBRARY_DIRS}/Release/LSDyna.dll
# Xerces-c dependency
${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll
# Libxml2 dependencies
${LIBXML2_INCLUDE_DIR}/../bin/iconv.dll
${LIBXML2_INCLUDE_DIR}/../bin/libxml2.dll
${LIBXML2_INCLUDE_DIR}/../bin/zlib1.dll
# ITK dependency
${ITK_ROOT_DIR}/bin/ITKCommon.dll
)
endif()
# Application icon
set(CAMITK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\core\\\\resources\\\\appIcon.ico") #set here the current icon for CamiTK apps
set(CPACK_PACKAGE_ICON ${CAMITK_PACKAGE_ICON}) #icon for the top bar NSIS installer
set(CPACK_NSIS_MUI_ICON ${CAMITK_PACKAGE_ICON}) #icon for the generated install program (the .exe to run to install CamiTK).
set(CPACK_NSIS_MUI_UNIICON ${CAMITK_PACKAGE_ICON}) #icon for the generated uninstall program (the .exe to run to uninstall CamiTK).
# Installer name
set(CPACK_NSIS_DISPLAY_NAME "CamiTK ${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}.${CAMITK_VER_PACKAGE_PAT}")
set(CPACK_NSIS_INSTALLED_ICON_NAME ${CAMITK_PROJECT_NAME})
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME} ${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}.${CAMITK_VER_PACKAGE_PAT}")
set(CPACK_NSIS_INSTALLED_ICON_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CAMITK_PROJECT_NAME})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\camitk.imag.fr")
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\camitk.imag.fr")
set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
......@@ -365,3 +396,5 @@ include(InstallRequiredSystemLibraries)
# and here we go...
include(CPack)
endif() # Standalone CEP
endmacro()
\ No newline at end of file
......@@ -64,25 +64,30 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CAMITK_SOURCE_DIR}/COPYRIGHT")
set(CPACK_PACKAGE_EXECUTABLES "camitk-imp" "camitk-imp" "camitk-actionstatemachine" "camitk-actionstatemachine")
# CamiTK package description
#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CamiTK user package.")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CamiTK stands for Computer Assisted Medical Intervention Tool Kit and aims at providing an easy way to protype medical applications. CamiTK functionnalities are extendable thanks to plugins. This package includes the IMP application with main plugins that allow users to interact with medical images (2D, 3D), process them and simulate biomechanichal deformations. It also includes the actionstatemachine application that allows user to easily run a pipelines of algorithms on images.")
# Files to ignore during generation of the package
set(CPACK_SOURCE_IGNORE_FILES
"~$"
"/CVS/"
"tags"
"/\\\\.svn/"
"/\\\\.git/"
"/kdev4$/"
"/build/"
"\\\\.kdevses$"
"\\\\.kdev4$"
"\\\\.kdevelop\\\\.pcs$"
".DS_Store"
${CPACK_SOURCE_IGNORE_FILES}
)
set(CPACK_SOURCE_GENERATOR "TGZ" "ZIP" )
# ----------------
# Debian packages
# ----------------
# ----------------------------------
# Unix packages (Ubuntu and Debian)
# ----------------------------------
if (UNIX AND NOT WIN32)
message(STATUS "Packaging CamiTK for UNIX systems")
......@@ -149,7 +154,7 @@ if (UNIX AND NOT WIN32)
if("${LSB_DISTRIB}" MATCHES "Ubuntu12.04.1")
set(LSB_DISTRIB "Ubuntu12.xx")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
endif()
endif()
if("${LSB_DISTRIB}" MATCHES "Ubuntu12.10")
set(LSB_DISTRIB "Ubuntu12.xx")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
......
......@@ -142,6 +142,8 @@ if(NOT ${CAMITK_INSTALL_ROOT} EQUAL "")
include(CamiTKVariables)
include(CamiTKMacros)
include(CamiTKTestMacros)
# include package generation
include(CamiTKExtensionPackaging)
# set install path
set (CMAKE_INSTALL_PREFIX ${CAMITK_INSTALL_ROOT} CACHE PATH "Path to install dir (deduced from CAMITK_INSTALL_ROOT)" FORCE)
......
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