[CMake] How to check the operating system is MacOSX?

Alexander Neundorf a.neundorf-work at gmx.net
Sat Sep 15 05:45:14 EDT 2012


On Saturday 15 September 2012, Loaden wrote:
> 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.


Why do you think it is not enough ?

Alex


More information about the CMake mailing list