Skip to content

Commit

Permalink
Add PCL_VERSION_PLAIN and use where appropriate
Browse files Browse the repository at this point in the history
This variable is just like PCL_VERSION, but with "-dev" suffix (if any)
replaced by ".99" tweak number.

fu
  • Loading branch information
taketwo committed Jun 30, 2017
1 parent 84474ba commit 48729a8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions PCLConfigVersion.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check whether the requested PACKAGE_FIND_VERSION is compatible

set(PACKAGE_VERSION @PCL_VERSION@)
set(PACKAGE_VERSION @PCL_VERSION_PLAIN@)

# Check whether the requested PACKAGE_FIND_VERSION is compatible
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
Expand All @@ -10,4 +10,4 @@ else()
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
4 changes: 2 additions & 2 deletions cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ macro(PCL_ADD_LIBRARY _name _component)
endif()

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
VERSION ${PCL_VERSION_PLAIN}
SOVERSION ${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
if(USE_PROJECT_FOLDERS)
Expand Down Expand Up @@ -240,7 +240,7 @@ macro(PCL_CUDA_ADD_LIBRARY _name _component)
target_link_libraries(${_name} ${Boost_LIBRARIES})

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
VERSION ${PCL_VERSION_PLAIN}
SOVERSION ${PCL_MAJOR_VERSION}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
if(USE_PROJECT_FOLDERS)
Expand Down
2 changes: 2 additions & 0 deletions cmake/pcl_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ macro(DISSECT_VERSION)
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$")
set(PCL_DEV_VERSION 1)
set(PCL_VERSION_PLAIN "${PCL_VERSION_PLAIN}.99")
else()
set(PCL_DEV_VERSION 0)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/pkgconfig-headeronly.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ libdir=${prefix}/@LIB_INSTALL_DIR@
includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@
Name: @PKG_NAME@
Description: @PKG_DESC@
Version: @PCL_VERSION@
Version: @PCL_VERSION_PLAIN@
Requires: @PKG_EXTERNAL_DEPS@
Libs:
Cflags: -I${includedir} @PKG_CFLAGS@
2 changes: 1 addition & 1 deletion cmake/pkgconfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ libdir=${prefix}/@LIB_INSTALL_DIR@
includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@
Name: @PKG_NAME@
Description: @PKG_DESC@
Version: @PCL_VERSION@
Version: @PCL_VERSION_PLAIN@
Requires: @PKG_EXTERNAL_DEPS@
Libs: -L${libdir} -l@PKG_NAME@ @PKG_LIBFLAGS@ @PKG_INTERNAL_DEPS@
Cflags: -I${includedir} @PKG_CFLAGS@
Expand Down

0 comments on commit 48729a8

Please sign in to comment.