updated RS-use script, to allow old versions of RS to be used

This commit is contained in:
Luis Peñaranda 2011-04-07 15:52:39 +00:00
parent 9ce6a37bd0
commit a5582e7d96
1 changed files with 13 additions and 5 deletions

View File

@ -48,12 +48,20 @@ if( NOT CGAL_RS_SETUP )
STRING(REGEX REPLACE ".*#define[ \t]+rs_minor[ \t]+([0-9]+).*" STRING(REGEX REPLACE ".*#define[ \t]+rs_minor[ \t]+([0-9]+).*"
"\\1" RS3_MINOR "${_rsversion_h_CONTENTS}") "\\1" RS3_MINOR "${_rsversion_h_CONTENTS}")
SET( RS3_LIB_VERSION "${RS3_MAJOR}.${RS3_MIDDLE}.${RS3_MINOR}" ) SET( RS3_LIB_VERSION "${RS3_MAJOR}.${RS3_MIDDLE}.${RS3_MINOR}" )
IS_VERSION_LESS( "${RS3_MAJOR}.${RS3_MIDDLE}" "3.1" RS_OLD_INCLUDES )
else( EXISTS "${RS3_INCLUDE_DIR}/rsversion.h" ) else( EXISTS "${RS3_INCLUDE_DIR}/rsversion.h" )
# rsversion.h did not exist in old versions
SET( RS3_LIB_VERSION "unknown" ) SET( RS3_LIB_VERSION "unknown" )
SET( RS_OLD_INCLUDES TRUE )
endif( EXISTS "${RS3_INCLUDE_DIR}/rsversion.h" ) endif( EXISTS "${RS3_INCLUDE_DIR}/rsversion.h" )
message( STATUS "RS version is ${RS3_LIB_VERSION}" ) message( STATUS "RS version is ${RS3_LIB_VERSION}" )
if( RS_OLD_INCLUDES )
add_definitions( "-DCGAL_RS_OLD_INCLUDES" )
message( STATUS "Using old RS signatures" )
endif( RS_OLD_INCLUDES )
endif( RS3_FOUND ) endif( RS3_FOUND )
endif( RS_FOUND ) endif( RS_FOUND )