Fixed CMake files failing on FreeBSD
This commit is contained in:
parent
78a625de22
commit
a647c68a7f
@ -4,16 +4,19 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|||||||
set(WINDOWS 1)
|
set(WINDOWS 1)
|
||||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(LINUX 1)
|
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")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set(MACOSX 1)
|
set(MACOSX 1)
|
||||||
|
|
||||||
# detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.)
|
# 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)
|
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}")
|
STRING(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
|
||||||
if(${MACOSX_VERSION} LESS 5)
|
if(${MACOSX_VERSION} LESS 5)
|
||||||
message(WARNING "Unsupported version of OS X : ${MACOSX_VERSION_RAW}")
|
message(WARNING "Unsupported version of OS X : ${MACOSX_VERSION_RAW}")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(WARNING "Unsupported operating system")
|
message(WARNING "Unsupported operating system")
|
||||||
|
Loading…
Reference in New Issue
Block a user