From b998925068f9b6a02571c8ca9b733810227bdd6c Mon Sep 17 00:00:00 2001 From: Mourad Boufarguine Date: Sun, 16 Oct 2011 13:57:00 +0000 Subject: [PATCH] All-in-one NSIS installer (1/2) : * pack Boost, Eigen, Flann, Qhull and VTK * add hints to PCLConfig.cmake * add PCL version to the installation folder name git-svn-id: svn+ssh://svn.pointclouds.org/pcl/tags/pcl-1.2@2800 a9d63959-f2ad-4865-b262-bf0e56cfafb6 --- CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e4453ebfb7..843e263273f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,25 @@ add_subdirectory(doc) ### ---[ Package creation include(${PCL_SOURCE_DIR}/cmake/pcl_cpack.cmake) +set(CPACK_PACKAGE_VERSION "${PCL_VERSION}") +set(CPACK_PACKAGE_VERSION_MAJOR "${PCL_MAJOR_VERSION}") +set(CPACK_PACKAGE_VERSION_MINOR "${PCL_MINOR_VERSION}") +set(CPACK_PACKAGE_VERSION_PATCH "${PCL_REVISION_VERSION}") +set(CPACK_PACKAGE_CONFIG_INSTALL_DIR ${PCLCONFIG_INSTALL_DIR}) +if(MSVC) + if(CMAKE_CL_64) + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") + set(win_system_name win64) + else(CMAKE_CL_64) + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32") + set(win_system_name win32) + endif(CMAKE_CL_64) + set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-${win_system_name}") + # force CPACK_PACKAGE_INSTALL_REGISTRY_KEY because of a known limitation in cmake/cpack to be fixed in next releases + # http://public.kitware.com/Bug/view.php?id=9094 + # This is to allow a 32bit and a 64bit of PCL to get installed on one system + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME} ${PCL_VERSION} ${win_system_name}" ) +endif(MSVC) if(CPACK_GENERATOR) message(STATUS "Found CPack generators: ${CPACK_GENERATOR}")