From a647c68a7f554e26542c927853a6891980cd52d8 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Wed, 14 Sep 2011 17:58:51 +0200 Subject: [PATCH] Fixed CMake files failing on FreeBSD --- cmake/Config.cmake | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 4b80e57eb..c0e700803 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -4,16 +4,19 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(WINDOWS 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX 1) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + # FreeBSD compile path is the same as Linux + set(LINUX 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(MACOSX 1) - - # detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.) - EXEC_PROGRAM(/usr/bin/sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW) - STRING(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") - if(${MACOSX_VERSION} LESS 5) - message(WARNING "Unsupported version of OS X : ${MACOSX_VERSION_RAW}") - return() - endif() + set(MACOSX 1) + + # detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.) + EXEC_PROGRAM(/usr/bin/sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW) + STRING(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") + if(${MACOSX_VERSION} LESS 5) + message(WARNING "Unsupported version of OS X : ${MACOSX_VERSION_RAW}") + return() + endif() else() message(WARNING "Unsupported operating system")