forked from MarcusMathiassen/P2D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (39 loc) · 1013 Bytes
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 3.6.2)
project(P2D)
# Compiler flags
set(CMAKE_CXX_STANDARD 14)
# SET(CMAKE_BUILD_TYPE DEBUG)
SET(CMAKE_BUILD_TYPE RELEASE)
SET(CMAKE_CXX_FLAGS_DEBUG)
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET(CMAKE_CXX_FLAGS "-Wall")
# Load headers
include_directories("include")
# Load sources
file(GLOB SOURCES "src/*.cpp")
# GLEW
find_package(glew REQUIRED)
if (GLEW_FOUND)
include_directories(${GLEW_INCLUDE_DIRS})
link_libraries(${GLEW_LIBRARIES})
endif()
# GLFW3
find_package(glfw3 3.2 REQUIRED)
if (GLFW3_FOUND)
include_directories(${GLFW3_INCLUDES})
link_libraries(${GLFW3_LIBRARIES})
endif()
# BOOST
find_package(BOOST REQUIRED)
if (BOOST_FOUND)
include_directories(${BOOST_INCLUDE_DIRS})
link_libraries(${BOOST_LIBRARIES})
endif()
# OPENGL
find_package(OpenGL REQUIRED)
if (OPENGL_FOUND)
include_directories(${OPENGL_INCLUDE_DIRS})
link_libraries(${OPENGL_LIBRARIES})
endif()
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} glfw)