-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
112 lines (100 loc) · 2.23 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
cmake_minimum_required(VERSION 3.14)
project(ecnavdA-yoBemaG)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
find_package(SDL2 CONFIG REQUIRED)
add_subdirectory(modules/nativefiledialog-extended)
add_subdirectory(modules/fmt)
include_directories(
modules/imgui/
modules/imgui_club/imgui_memory_editor
include/
)
add_executable(ecnavda-yobemag
modules/imgui/imgui_draw.cpp
modules/imgui/imgui_demo.cpp
modules/imgui/imgui_tables.cpp
modules/imgui/imgui_widgets.cpp
modules/imgui/imgui.cpp
modules/imgui/backends/imgui_impl_sdl.cpp
modules/imgui/backends/imgui_impl_opengl3.cpp
src/main.cpp
src/ppudebug.cpp
src/arm7tdmidisasm.cpp
src/gba.cpp
src/arm7tdmi.cpp
src/cpu.cpp
src/hlebios.cpp
src/apu.cpp
src/dma.cpp
src/ppu.cpp
src/timer.cpp
)
target_compile_definitions(fmt PUBLIC FMT_EXCEPTIONS=0)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_compile_options(ecnavda-yobemag PRIVATE
/clang:-ftemplate-depth=5000
/clang:-fconstexpr-depth=5000
/clang:-MMD
/clang:-MP
#-Wall
#-fsanitize=address
#-fsanitize=leak
#-fsanitize=pointer-compare
#-fsanitize=pointer-subtract
#-fstack-protector-all
#-fsanitize=undefined
#-fsanitize=thread
)
target_link_libraries(ecnavda-yobemag PRIVATE
SDL2::SDL2
SDL2::SDL2main
nfd
fmt
opengl32
#-fsanitize=address
#-fsanitize=leak
#-fsanitize=pointer-compare
#-fsanitize=pointer-subtract
#-fstack-protector-all
#-fsanitize=undefined
#-fsanitize=thread
)
else()
target_compile_options(ecnavda-yobemag PRIVATE
-ftemplate-depth=5000
-fconstexpr-depth=5000
-MMD
-MP
#-Wall
#-fsanitize=address
#-fsanitize=leak
#-fsanitize=pointer-compare
#-fsanitize=pointer-subtract
#-fstack-protector-all
#-fsanitize=undefined
#-fsanitize=thread
)
target_link_libraries(ecnavda-yobemag PRIVATE
SDL2::SDL2
SDL2::SDL2main
nfd
fmt
-lstdc++
-ldl
-lGL
-lm
-lpthread
#-fsanitize=address
#-fsanitize=leak
#-fsanitize=pointer-compare
#-fsanitize=pointer-subtract
#-fstack-protector-all
#-fsanitize=undefined
#-fsanitize=thread
)
endif()