Follow this wiki:
http://www.itk.org/Wiki/CMake/Examples#Check_operating_system
There say:

>  IF(WIN32)
>    ...do something...
>  ELSE(WIN32)
>    ...do something else...
>  ENDIF(WIN32)
>
>  or:
>
> IF(CMAKE_SYSTEM_NAME STREQUAL Linux)
>
>
As I know:
if (APPLE)
...
endif()
is not enough.

For now I have to using:

if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
>     set(WINDOWS TRUE)
> elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
>     set(LINUX TRUE)
> elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
>     set(MACOSX TRUE)
> endif()
>

My question:
How to check the operating system is MacOSX?

-- 
Best Regards
Yuchen
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to