-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
43 lines (36 loc) · 1.36 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
cmake_minimum_required(VERSION 3.7)
project(superflappybirds_libretro)
set (CMAKE_CXX_STANDARD 14)
# Enable OpenMP for multithreading in Engine
OPTION (USE_OpenMP "Use OpenMP" ON)
IF(USE_OpenMP)
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
ENDIF()
ENDIF()
# Include engine files
file(GLOB ENGINE_SOURCE "engine/*.hpp" "engine/*.cpp")
# Set source files
add_library(${PROJECT_NAME} SHARED
libretro.hpp
libretro.cpp
game.cpp game.hpp
pipe_pair.cpp pipe_pair.hpp
assets.hpp
bird.cpp bird.hpp
input.hpp
auxillary.hpp
menu.cpp menu.hpp
save_data.cpp save_data.hpp
highscore_sub_window.hpp
contexts/context.hpp
contexts/context_highscore_input.hpp contexts/context_highscore_input.cpp
contexts/context_main.hpp contexts/context_main.cpp
contexts/context_high_score_view.hpp contexts/context_high_score_view.cpp
contexts/context_load_old_save_file.cpp contexts/context_load_old_save_file.hpp
${ENGINE_SOURCE})
target_link_libraries(${PROJECT_NAME})
# Removes the 'lib' prefix on Linux
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")