diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake index 6dfdfaa5186..42a5621b9f4 100644 --- a/cmake/pcl_utils.cmake +++ b/cmake/pcl_utils.cmake @@ -50,7 +50,7 @@ macro(DISSECT_VERSION) 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" + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PCL_REVISION_VERSION "${PCL_VERSION}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1" PCL_CANDIDATE_VERSION "${PCL_VERSION}") diff --git a/pcl_config.h.in b/pcl_config.h.in index 2659ab60ca5..ab74dcc2c22 100644 --- a/pcl_config.h.in +++ b/pcl_config.h.in @@ -2,12 +2,12 @@ #define BUILD_@CMAKE_BUILD_TYPE@ /* PCL version information */ -#cmakedefine PCL_MAJOR_VERSION ${PCL_MAJOR_VERSION} -#cmakedefine PCL_MINOR_VERSION ${PCL_MINOR_VERSION} -#cmakedefine PCL_REVISION_VERSION ${PCL_REVISION_VERSION} -#cmakedefine PCL_VERSION_PRETTY "${PCL_VERSION}" +#define PCL_MAJOR_VERSION ${PCL_MAJOR_VERSION} +#define PCL_MINOR_VERSION ${PCL_MINOR_VERSION} +#define PCL_REVISION_VERSION ${PCL_REVISION_VERSION} +#define PCL_VERSION_PRETTY "${PCL_VERSION}" #define PCL_VERSION_CALC(MAJ, MIN, PATCH) (MAJ*100000+MIN*100+PATCH) -#cmakedefine PCL_VERSION \ +#define PCL_VERSION \ PCL_VERSION_CALC(PCL_MAJOR_VERSION,PCL_MINOR_VERSION,PCL_REVISION_VERSION) #define PCL_VERSION_COMPARE(OP,MAJ,MIN,PATCH) \ (PCL_VERSION OP PCL_VERSION_CALC(MAJ,MIN,PATCH))