-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (34 loc) · 1.1 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
38
39
40
cmake_minimum_required(VERSION 3.1)
project(Plaine)
set(CMAKE_REQUIRED_FLAGS "-std=c++14")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++14")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DDEBUG_OUTPUT=false")
set(CMAKE_CXX_FLAGS_DEBUG "-g" )
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules)
find_package(Irrlicht REQUIRED)
find_package(Bullet REQUIRED)
find_package(Freetype REQUIRED)
find_package(SFML REQUIRED COMPONENTS audio)
find_package(Threads REQUIRED)
file(GLOB_RECURSE CPPs "src/*.cpp")
file(GLOB_RECURSE Hs "include/*.h")
add_executable(${PROJECT_NAME} main.cpp ${CPPs} ${Hs})
include_directories("include/")
include_directories(SYSTEM
${IRRLICHT_INCLUDE_DIR}
${BULLET_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
${SFML_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME}
${IRRLICHT_LIBRARY}
${BULLET_COLLISION_LIBRARY}
${BULLET_DYNAMICS_LIBRARY}
${BULLET_MATH_LIBRARY}
${FREETYPE_LIBRARY}
${SFML_LIBRARIES}
Threads::Threads)
if(DEBUG)
set(CMAKE_BUILD_TYPE "Debug")
endif()