-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (43 loc) · 944 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
52
53
54
cmake_minimum_required(VERSION 3.21)
project(nes CXX)
include(cmake/base.cmake)
include(cmake/warnings.cmake)
include(cmake/debug.cmake)
include(cmake/libraries.cmake)
add_executable(${PROJECT_NAME})
target_compile_features(
${PROJECT_NAME}
PRIVATE
cxx_std_17
)
target_sources(
${PROJECT_NAME}
PRIVATE
src/nes/Bus.cpp
src/nes/CPU.cpp
src/nes/Cartridge.cpp
src/nes/Mapper.cpp
src/nes/mapper/NROM.cpp
src/main.cpp
)
target_precompile_headers(
${PROJECT_NAME}
PRIVATE
include/common/types.hpp
include/common/BitField.hpp
include/nes/Mapper.hpp
include/nes/Cartridge.hpp
include/nes/mapper/NROM.hpp
)
target_include_directories(
${PROJECT_NAME}
PRIVATE
${PROJECT_SOURCE_DIR}/include
)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set_debug_options(${PROJECT_NAME})
else()
target_compile_options(${target} PRIVATE -g0 -O3)
endif()
set_default_warnings(${PROJECT_NAME})
link_default_libraries(${PROJECT_NAME})