/[pcsx2_0.9.7]/trunk/cmake/Pcsx2Utils.cmake
ViewVC logotype

Contents of /trunk/cmake/Pcsx2Utils.cmake

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 1 month ago) by william
File size: 1108 byte(s)
re-commit (had local access denied errors when committing)
1 # additonal cmake macros and functions
2
3 #-------------------------------------------------------------------------------
4 # detectOperatingSystem
5 #-------------------------------------------------------------------------------
6 # This function detects on which OS cmake is run and set a flag to control the
7 # build process. Supported OS: Linux, MacOSX, Windows
8 #-------------------------------------------------------------------------------
9 function(detectOperatingSystem)
10 # nothing detected yet
11 set(Linux FALSE PARENT_SCOPE)
12 set(MacOSX FALSE PARENT_SCOPE)
13 set(Windows FALSE PARENT_SCOPE)
14
15 # check if we are on Linux
16 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
17 set(Linux TRUE PARENT_SCOPE)
18 endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
19
20 # check if we are on MacOSX
21 if(APPLE)
22 set(MacOSX TRUE PARENT_SCOPE)
23 endif(APPLE)
24
25 # check if we are on Windows
26 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
27 set(Windows TRUE PARENT_SCOPE)
28 endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
29 endfunction(detectOperatingSystem)
30 #-------------------------------------------------------------------------------
31

  ViewVC Help
Powered by ViewVC 1.1.22