-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (31 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#--------------------------------------------------------------------------
# gscept laboration environment
#--------------------------------------------------------------------------
PROJECT(gscept_lab_env)
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
MACRO(TARGET_PCH target path)
IF(WIN32)
IF(MSVC)
SET_TARGET_PROPERTIES(${target}
PROPERTIES
COMPILE_FLAGS "/Yuconfig.h /Fp${CMAKE_CFG_INTDIR}/${target}.pch")
SET_SOURCE_FILES_PROPERTIES(${path}config.cc
PROPERTIES
COMPILE_FLAGS "/Ycconfig.h")
ENDIF()
ENDIF()
ENDMACRO(TARGET_PCH)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF()
IF(MSVC)
SET(OPENGL_LIBS opengl32.lib)
ELSE()
SET(OPENGL_LIBS GL GLU X11 Xxf86vm pthread Xrandr Xi Xinerama Xcursor)
ENDIF()
SET(GSCEPT_LAB_ENV_ROOT ${CMAKE_CURRENT_DIR})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${CMAKE_SOURCE_DIR}/bin>)
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS GLEW_STATIC)
ADD_SUBDIRECTORY(exts)
ADD_SUBDIRECTORY(engine)
ADD_SUBDIRECTORY(projects)