Skip to content

Commit

Permalink
finder cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed Jan 23, 2013
1 parent 14cd19b commit fcff93c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/Modules/FindSFCGAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ IF(SFCGAL_INCLUDE_DIR)
IF(EXISTS "${SFCGAL_INCLUDE_DIR}/SFCGAL/version.h")
FILE(STRINGS "${SFCGAL_INCLUDE_DIR}/SFCGAL/version.h" sfcgal_version_str REGEX "^#define[\t ]+SFCGAL_VERSION[\t ]+\".*\"")

STRING(REGEX REPLACE "^#define[\t ]+SFCGAL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" SFCGAL_VERSION "${ign_socle_version_str}")

STRING(REGEX REPLACE "^#define[\t ]+SFCGAL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" SFCGAL_VERSION "${sfcgal_version_str}")
# from http://www.cmake.org/Wiki/CMakeCompareVersionStrings
# Breaks up a string in the form n1.n2.n3 into three parts and stores
# them in major, minor, and patch. version should be a value, not a
Expand All @@ -33,7 +33,7 @@ IF(SFCGAL_INCLUDE_DIR)
STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" SFCGAL_MINOR_VERSION "${SFCGAL_VERSION}")
STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" SFCGAL_PATCH_VERSION "${SFCGAL_VERSION}")
ELSE()
MESSAGE( WARNING "IGN_SOCLE_VERSION (${SFCGAL_VERSION}) doesn't match *.*.* form" )
MESSAGE( WARNING "SFCGAL_VERSION (${SFCGAL_VERSION}) doesn't match *.*.* form" )
ENDIF()


Expand All @@ -59,7 +59,7 @@ find_library(SFCGAL_LIBRARY_DEBUG NAMES SFCGALd
# set output variables
set( SFCGAL_INCLUDE_DIRS "${SFCGAL_INCLUDE_DIR}" )
if ( SFCGAL_LIBRARY_DEBUG )
set( SFCGAL_LIBRARIES "optimized;${SFCGAL_LIBRARY};debug;${SFCGAL_LIBRARY_DEBUG} )
set( SFCGAL_LIBRARIES "optimized;${SFCGAL_LIBRARY};debug;${SFCGAL_LIBRARY_DEBUG}" )
else()
set( SFCGAL_LIBRARIES ${SFCGAL_LIBRARY} )
endif()
Expand Down

0 comments on commit fcff93c

Please sign in to comment.