mirror of https://github.com/CGAL/cgal
updated RS-use script, to allow old versions of RS to be used
This commit is contained in:
parent
9ce6a37bd0
commit
a5582e7d96
|
|
@ -39,7 +39,7 @@ if( NOT CGAL_RS_SETUP )
|
||||||
|
|
||||||
# extract RS3 version from the file rsversion.h (based on Fernando
|
# extract RS3 version from the file rsversion.h (based on Fernando
|
||||||
# Cacciola's code for FindBoost.cmake)
|
# Cacciola's code for FindBoost.cmake)
|
||||||
if(EXISTS "${RS3_INCLUDE_DIR}/rsversion.h")
|
if( EXISTS "${RS3_INCLUDE_DIR}/rsversion.h" )
|
||||||
FILE(READ "${RS3_INCLUDE_DIR}/rsversion.h" _rsversion_h_CONTENTS)
|
FILE(READ "${RS3_INCLUDE_DIR}/rsversion.h" _rsversion_h_CONTENTS)
|
||||||
STRING(REGEX REPLACE ".*#define[ \t]+rs_major[ \t]+([0-9]+).*"
|
STRING(REGEX REPLACE ".*#define[ \t]+rs_major[ \t]+([0-9]+).*"
|
||||||
"\\1" RS3_MAJOR "${_rsversion_h_CONTENTS}")
|
"\\1" RS3_MAJOR "${_rsversion_h_CONTENTS}")
|
||||||
|
|
@ -47,13 +47,21 @@ if( NOT CGAL_RS_SETUP )
|
||||||
"\\1" RS3_MIDDLE "${_rsversion_h_CONTENTS}")
|
"\\1" RS3_MIDDLE "${_rsversion_h_CONTENTS}")
|
||||||
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}" )
|
||||||
else(EXISTS "${RS3_INCLUDE_DIR}/rsversion.h")
|
IS_VERSION_LESS( "${RS3_MAJOR}.${RS3_MIDDLE}" "3.1" RS_OLD_INCLUDES )
|
||||||
SET(RS3_LIB_VERSION "unknown")
|
else( EXISTS "${RS3_INCLUDE_DIR}/rsversion.h" )
|
||||||
endif(EXISTS "${RS3_INCLUDE_DIR}/rsversion.h")
|
# rsversion.h did not exist in old versions
|
||||||
|
SET( RS3_LIB_VERSION "unknown" )
|
||||||
|
SET( RS_OLD_INCLUDES TRUE )
|
||||||
|
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 )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue