- propper names for global includes
[genesis3d.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED  (VERSION 3.0)
2 PROJECT                 (Genesis3D)
3
4 # includes and outputs
5 SET                     (CMAKE_INCLUDE_CURRENT_DIR on)
6 INCLUDE_DIRECTORIES     ("/usr/include/wine")
7 INCLUDE_DIRECTORIES     ("/usr/include/wine/windows")
8 INCLUDE_DIRECTORIES     ("/usr/include/wine/msvcrt")
9 INCLUDE_DIRECTORIES     (${PROJECT_SOURCE_DIR})
10 SET                     (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
11 SET                     (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/plugin)
12 SET                     (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
13
14 # compiler settings
15 SET                     (CMAKE_C_COMPILER /usr/bin/winegcc)
16 SET                     (CMAKE_CXX_COMPILER /usr/bin/wineg++)
17 MESSAGE                 ("C-COMPILER: ${CMAKE_C_COMPILER}")
18 MESSAGE                 ("CXX-COMPILER: ${CMAKE_CXX_COMPILER}")
19 IF                      (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
20 MESSAGE                     ("Unix-like system: ${CMAKE_SYSTEM_NAME}")
21 SET                         (CMAKE_CXX_FLAGS "-std=c++1y -fno-builtin -fdiagnostics-color=always -W -Wall -Wextra -Os")
22 SET                         (CMAKE_C_FLAGS "-std=c11 -fno-builtin -fdiagnostics-color=always -W -Wall -Wextra -Os")
23 ELSEIF                  (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
24 MESSAGE                     ("Windows-like system: ${CMAKE_SYSTEM_NAME}")
25 SET                         (CMAKE_CXX_FLAGS "-std=c++1y -W -Wall -Wextra -Os")
26 SET                         (CMAKE_C_FLAGS "-std=c11 -W -Wall -Wextra -Os")
27 ELSE                    ()
28 MESSAGE                     (FATAL_ERROR "unsupported system: ${CMAKE_SYSTEM_NAME}")
29 ENDIF                   ()
30
31 ADD_SUBDIRECTORY        (G3D)