diff --git a/CMakeLists.txt b/CMakeLists.txt index 39cd00c3aeb..de08f01fcdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,6 @@ ### ---[ PCL global CMake cmake_minimum_required(VERSION 3.1 FATAL_ERROR) -if(POLICY CMP0048) - cmake_policy(SET CMP0048 OLD) # do not use VERSION option in project() command -endif() - if(POLICY CMP0054) cmake_policy(SET CMP0054 OLD) # Silent warnings about quoted variables endif() @@ -23,7 +19,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type default to RelWithDebInfo, set to Release to improve performance" FORCE) endif() -project(PCL) +project(PCL VERSION 1.9.0.99) string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) ### ---[ Find universal dependencies @@ -202,7 +198,6 @@ if(CMAKE_COMPILER_IS_CLANG) endif() include("${PCL_SOURCE_DIR}/cmake/pcl_utils.cmake") -set(PCL_VERSION "1.9.0-dev" CACHE STRING "PCL version") DISSECT_VERSION() GET_OS_INFO() SET_INSTALL_DIRS() diff --git a/PCLConfigVersion.cmake.in b/PCLConfigVersion.cmake.in index db85ffea8fb..029804fff2b 100644 --- a/PCLConfigVersion.cmake.in +++ b/PCLConfigVersion.cmake.in @@ -1,6 +1,6 @@ # Check whether the requested PACKAGE_FIND_VERSION is compatible -set(PACKAGE_VERSION @PCL_VERSION_PLAIN@) +set(PACKAGE_VERSION @PCL_VERSION@) # Check whether the requested PACKAGE_FIND_VERSION is compatible if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") diff --git a/cmake/cpack_options.cmake.in b/cmake/cpack_options.cmake.in index 5e716d9426d..3251694df69 100644 --- a/cmake/cpack_options.cmake.in +++ b/cmake/cpack_options.cmake.in @@ -1,14 +1,14 @@ set(CPACK_PACKAGE_NAME "@PROJECT_NAME@") set(CPACK_PACKAGE_VENDOR "PointClouds.org") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Point Cloud Library (PCL)") -set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@ @PCL_VERSION@") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@ @PCL_VERSION_PRETTY@") set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/LICENSE.txt") set(CPACK_RESOURCE_FILE_README "@PROJECT_SOURCE_DIR@/AUTHORS.txt") @PCL_CPACK_COMPONENTS@ IF ((WIN32 OR UNIX) AND (CPACK_GENERATOR STREQUAL "NSIS")) - set(CPACK_NSIS_DISPLAY_NAME "@PROJECT_NAME@-@PCL_VERSION@") + set(CPACK_NSIS_DISPLAY_NAME "@PROJECT_NAME@-@PCL_VERSION_PRETTY@") set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake/images/pcl.ico") set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake/images/pcl.ico") set(CPACK_NSIS_HELP_LINK "http://www.pointclouds.org") @@ -16,9 +16,9 @@ IF ((WIN32 OR UNIX) AND (CPACK_GENERATOR STREQUAL "NSIS")) set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_PACKAGE_EXECUTABLES @PCL_EXECUTABLES@) set(CPACK_NSIS_MENU_LINKS - "share/doc/pcl-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@/tutorials/html/index.html" "Tutorials" - "share/doc/pcl-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@/tutorials/html/sources" "Tutorials sources" - "share/doc/pcl-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@/html/pcl-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@.chm" "Documentation" + "share/doc/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@/tutorials/html/index.html" "Tutorials" + "share/doc/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@/tutorials/html/sources" "Tutorials sources" + "share/doc/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@/html/pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@.chm" "Documentation" "http://www.pointclouds.org" "PCL Website") #set(CPACK_NSIS_MENU_LINKS "share/doc/@PROJECT_NAME@/user_guide.pdf" "User's guide") #set(CPACK_NSIS_MENU_LINKS "share/doc/@PROJECT_NAME@/developer_guide.pdf" "Developer's guide") diff --git a/cmake/pcl_cpack.cmake b/cmake/pcl_cpack.cmake index 8869279f127..8ebcfea998e 100644 --- a/cmake/pcl_cpack.cmake +++ b/cmake/pcl_cpack.cmake @@ -9,10 +9,10 @@ # list(APPEND CPACK_GENERATOR "RPM") #endif(EXISTS ${RPM_PROGRAM}) -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_VERSION "${PCL_VERSION_PRETTY}") +set(CPACK_PACKAGE_VERSION_MAJOR "${PCL_VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${PCL_VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${PCL_VERSION_PATCH}") set(CPACK_PACKAGE_CONFIG_INSTALL_DIR ${PCLCONFIG_INSTALL_DIR}) # DEB @@ -33,9 +33,9 @@ if(WIN32) set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32") set(win_system_name win32) endif(CMAKE_CL_64) - set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}") + set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION_PRETTY}") if(BUILD_all_in_one_installer) - set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-AllInOne") + set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION_PRETTY}-AllInOne") endif(BUILD_all_in_one_installer) if(MSVC_VERSION EQUAL 1600) set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2010-${win_system_name}") @@ -54,7 +54,7 @@ if(WIN32) # 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}" ) + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME} ${PCL_VERSION_PRETTY} ${win_system_name}" ) endif() # dpkg diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake index 22049d262f0..ff9ea2b05a8 100644 --- a/cmake/pcl_targets.cmake +++ b/cmake/pcl_targets.cmake @@ -207,8 +207,8 @@ macro(PCL_ADD_LIBRARY _name _component) endif() set_target_properties(${_name} PROPERTIES - VERSION ${PCL_VERSION_PLAIN} - SOVERSION ${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION} + VERSION ${PCL_VERSION} + SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR} DEFINE_SYMBOL "PCLAPI_EXPORTS") if(USE_PROJECT_FOLDERS) set_target_properties(${_name} PROPERTIES FOLDER "Libraries") @@ -240,8 +240,8 @@ macro(PCL_CUDA_ADD_LIBRARY _name _component) target_link_libraries(${_name} ${Boost_LIBRARIES}) set_target_properties(${_name} PROPERTIES - VERSION ${PCL_VERSION_PLAIN} - SOVERSION ${PCL_MAJOR_VERSION} + VERSION ${PCL_VERSION} + SOVERSION ${PCL_VERSION_MAJOR} DEFINE_SYMBOL "PCLAPI_EXPORTS") if(USE_PROJECT_FOLDERS) set_target_properties(${_name} PROPERTIES FOLDER "Libraries") @@ -468,14 +468,14 @@ macro(PCL_MAKE_PKGCONFIG _name _component _desc _pcl_deps _ext_deps _int_deps _c LIST_TO_STRING(_ext_deps_str "${_ext_deps}") set(PKG_EXTERNAL_DEPS ${_ext_deps_str}) foreach(_dep ${_pcl_deps}) - set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") + set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") endforeach(_dep) set(PKG_INTERNAL_DEPS "") foreach(_dep ${_int_deps}) set(PKG_INTERNAL_DEPS "${PKG_INTERNAL_DEPS} -l${_dep}") endforeach(_dep) - set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}.pc) + set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}.pc) configure_file(${PROJECT_SOURCE_DIR}/cmake/pkgconfig.cmake.in ${_pc_file} @ONLY) install(FILES ${_pc_file} DESTINATION ${PKGCFG_INSTALL_DIR} @@ -503,13 +503,13 @@ set(PKG_CFLAGS ${_cflags}) LIST_TO_STRING(_ext_deps_str "${_ext_deps}") set(PKG_EXTERNAL_DEPS ${_ext_deps_str}) foreach(_dep ${_pcl_deps}) -set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") +set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") endforeach(_dep) set(PKG_INTERNAL_DEPS "") foreach(_dep ${_int_deps}) set(PKG_INTERNAL_DEPS "${PKG_INTERNAL_DEPS} -l${_dep}") endforeach(_dep) -set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}.pc) +set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}.pc) configure_file(${PROJECT_SOURCE_DIR}/cmake/pkgconfig-headeronly.cmake.in ${_pc_file} @ONLY) install(FILES ${_pc_file} DESTINATION ${PKGCFG_INSTALL_DIR} COMPONENT pcl_${_component}) diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake index 41a64a26984..b1260c55ef8 100644 --- a/cmake/pcl_utils.cmake +++ b/cmake/pcl_utils.cmake @@ -59,19 +59,13 @@ endmacro(REMOVE_VTK_DEFINITIONS) ############################################################################### # Pull the component parts out of the version number. macro(DISSECT_VERSION) - # Find version components - string(REGEX REPLACE "^([0-9]+).*" "\\1" - PCL_MAJOR_VERSION "${PCL_VERSION}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" - PCL_MINOR_VERSION "${PCL_VERSION}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" - PCL_REVISION_VERSION "${PCL_VERSION}") - set(PCL_VERSION_PLAIN "${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}.${PCL_REVISION_VERSION}") - if(${PCL_VERSION} MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+-dev$") + # Detect if we're in a developlment version and generate pretty version string + if(${PCL_VERSION_TWEAK} EQUAL 99) set(PCL_DEV_VERSION 1) - set(PCL_VERSION_PLAIN "${PCL_VERSION_PLAIN}.99") + set(PCL_VERSION_PRETTY "${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}.${PCL_VERSION_PATCH}-dev") else() set(PCL_DEV_VERSION 0) + set(PCL_VERSION_PRETTY "${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}.${PCL_VERSION_PATCH}") endif() endmacro(DISSECT_VERSION) @@ -105,18 +99,18 @@ macro(SET_INSTALL_DIRS) endif (NOT DEFINED LIB_INSTALL_DIR) if(NOT ANDROID) set(INCLUDE_INSTALL_ROOT - "include/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") + "include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") else(NOT ANDROID) set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir endif(NOT ANDROID) set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl") - set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") + set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") set(BIN_INSTALL_DIR "bin") set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") if(WIN32 AND NOT MINGW) set(PCLCONFIG_INSTALL_DIR "cmake") else(WIN32 AND NOT MINGW) - set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") + set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") endif(WIN32 AND NOT MINGW) endmacro(SET_INSTALL_DIRS) diff --git a/cmake/pkgconfig-headeronly.cmake.in b/cmake/pkgconfig-headeronly.cmake.in index b543e312a3b..950fa785c25 100644 --- a/cmake/pkgconfig-headeronly.cmake.in +++ b/cmake/pkgconfig-headeronly.cmake.in @@ -3,10 +3,10 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${prefix}/@LIB_INSTALL_DIR@ #includedir=${prefix}/@INCLUDE_INSTALL_DIR@ -includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@ +includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@ Name: @PKG_NAME@ Description: @PKG_DESC@ -Version: @PCL_VERSION_PLAIN@ +Version: @PCL_VERSION@ Requires: @PKG_EXTERNAL_DEPS@ Libs: Cflags: -I${includedir} @PKG_CFLAGS@ diff --git a/cmake/pkgconfig.cmake.in b/cmake/pkgconfig.cmake.in index 6798be957c7..c351e441a15 100644 --- a/cmake/pkgconfig.cmake.in +++ b/cmake/pkgconfig.cmake.in @@ -3,10 +3,10 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${prefix}/@LIB_INSTALL_DIR@ #includedir=${prefix}/@INCLUDE_INSTALL_DIR@ -includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@ +includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@ Name: @PKG_NAME@ Description: @PKG_DESC@ -Version: @PCL_VERSION_PLAIN@ +Version: @PCL_VERSION@ Requires: @PKG_EXTERNAL_DEPS@ Libs: -L${libdir} -l@PKG_NAME@ @PKG_LIBFLAGS@ @PKG_INTERNAL_DEPS@ Cflags: -I${includedir} @PKG_CFLAGS@ diff --git a/doc/doxygen/doxyfile.in b/doc/doxygen/doxyfile.in index e2047862511..b3069936038 100644 --- a/doc/doxygen/doxyfile.in +++ b/doc/doxygen/doxyfile.in @@ -3,7 +3,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "Point Cloud Library (PCL)" -PROJECT_NUMBER = @PCL_VERSION@ +PROJECT_NUMBER = @PCL_VERSION_PRETTY@ PROJECT_BRIEF = PROJECT_LOGO = OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@" @@ -178,7 +178,7 @@ DOCSET_BUNDLE_ID = pointclouds.org DOCSET_PUBLISHER_ID = pointclouds.org.Publisher DOCSET_PUBLISHER_NAME = Point Cloud Library (PCL) Development Team GENERATE_HTMLHELP = @DOCUMENTATION_HTML_HELP@ -CHM_FILE = "pcl-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@.chm" +CHM_FILE = "pcl-@PCL_VERSION_MAJOR@.@PCL_VERSION_MINOR@.chm" HHC_LOCATION = "@HTML_HELP_COMPILER@" GENERATE_CHI = NO CHM_INDEX_ENCODING = diff --git a/pcl_config.h.in b/pcl_config.h.in index a654294f7be..03650f0e24e 100644 --- a/pcl_config.h.in +++ b/pcl_config.h.in @@ -2,11 +2,11 @@ #define BUILD_@CMAKE_BUILD_TYPE@ /* PCL version information */ -#define PCL_MAJOR_VERSION ${PCL_MAJOR_VERSION} -#define PCL_MINOR_VERSION ${PCL_MINOR_VERSION} -#define PCL_REVISION_VERSION ${PCL_REVISION_VERSION} +#define PCL_MAJOR_VERSION ${PCL_VERSION_MAJOR} +#define PCL_MINOR_VERSION ${PCL_VERSION_MINOR} +#define PCL_REVISION_VERSION ${PCL_VERSION_PATCH} #define PCL_DEV_VERSION ${PCL_DEV_VERSION} -#define PCL_VERSION_PRETTY "${PCL_VERSION}" +#define PCL_VERSION_PRETTY "${PCL_VERSION_PRETTY}" #define PCL_VERSION_CALC(MAJ, MIN, PATCH) (MAJ*100000+MIN*100+PATCH) #define PCL_VERSION \ PCL_VERSION_CALC(PCL_MAJOR_VERSION, PCL_MINOR_VERSION, PCL_REVISION_VERSION)