-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (26 loc) · 874 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
project(xomod)
cmake_minimum_required(VERSION 2.6)
include(CheckCXXCompilerFlag)
set (CMAKE_CXX_STANDARD 11)
check_cxx_compiler_flag(-Wall HAS_WALL)
if (HAS_WALL)
add_definitions(-Wall)
endif()
check_cxx_compiler_flag(-Wimplicit-fallthrough HAS_WFALLTHROUGH)
if (HAS_WFALLTHROUGH)
add_definitions(-Wimplicit-fallthrough)
endif()
set(XOMOD_SOURCES
src/chip8/backend/terminal/TerminalBackend.cpp
src/chip8/backend/sdl2/SDL2Backend.cpp
src/chip8/Audio.cpp
src/chip8/Chip8.cpp
src/chip8/Config.cpp
src/chip8/Memory.cpp
src/main.cpp
)
add_subdirectory(src/chip8/backend/sdl2/sdl2pp)
include_directories(src src/chip8/backend/sdl2/sdl2pp ${SDL2_INCLUDE_DIR} ${CMAKE_BINARY_DIR}/src/chip8/backend/sdl2/sdl2pp)
add_executable(xomod ${XOMOD_SOURCES})
target_link_libraries(xomod SDL2pp ${SDL2_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
install(TARGETS xomod DESTINATION bin)