-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (39 loc) · 1.52 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
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.11)
# set the project name & version
project(bomberman VERSION 0.1)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
set(Irrlicht_DIR "${CMAKE_MODULE_PATH}/Irrlicht")
IF(WIN32)
set(SFML_DIR "${CMAKE_MODULE_PATH}/SFML/lib/cmake/SFML")
ENDIF(WIN32)
# find packages (le .cmake dedans)
find_package(Irrlicht REQUIRED)
find_package(SFML 2.5 COMPONENTS system audio REQUIRED)
# add include directories
include_directories(include)
include_directories(include/components)
include_directories(include/exceptions)
include_directories(include/entity)
include_directories(include/music)
include_directories(include/sound)
include_directories(include/objectContainer)
include_directories(include/scenes)
include_directories(include/systems)
include_directories(include/ui)
include_directories(${Irrlicht_INCLUDE_DIRS})
# add the executable
# add_definitions("-Wall -g")
file(GLOB SRCS src/*.cpp)
file(GLOB SRCS_SYSTEM src/systems/*.cpp)
file(GLOB SRCS_COMPONENTS src/components/*.cpp)
file(GLOB SRCS_EXCEPTIONS src/exceptions/*.cpp)
file(GLOB SRCS_SCENES src/scenes/*.cpp)
file(GLOB SRCS_MUSIC src/music/*.cpp)
file(GLOB SRCS_SOUND src/sound/*.cpp)
file(GLOB SRCS_UI src/ui/*.cpp)
add_executable(bomberman ${SRCS} ${SRCS_SYSTEM} ${SRCS_COMPONENTS} ${SRCS_EXCEPTIONS} ${SRCS_SCENES} ${SRCS_MUSIC} ${SRCS_SOUND} ${SRCS_UI})
target_link_libraries(bomberman ${Irrlicht_LIBRARIES})
target_link_libraries(bomberman sfml-audio)