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")