-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
156 lines (148 loc) · 5.16 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
cmake_minimum_required(VERSION 3.10)
project(GBEmulator)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/pkgs)
find_package(SFML REQUIRED)
find_package(TGUI)
include_directories(
${SFML_INCLUDE_DIRS}
)
if (NOT MSVC)
if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
add_compile_options(-W -Wall -Wextra -Wshadow -O0)
else ()
add_compile_options(-O3)
add_link_options(-mwindows)
endif()
endif()
add_executable(
GBEmulator
src/debugger/debugger.cpp
src/debugger/debugger.hpp
src/Joypad/JoypadEmulator.hpp
src/Joypad/SfmlKeyboardJoypadEmulator.cpp
src/Joypad/SfmlKeyboardJoypadEmulator.hpp
src/LCD/ILCD.cpp
src/LCD/ILCD.hpp
src/LCD/LCDSFML.cpp
src/LCD/LCDSFML.hpp
src/main.cpp
src/Memory/Cartridge.cpp
src/Memory/Cartridge.hpp
src/Memory/Memory.cpp
src/Memory/Memory.hpp
src/Memory/ROM.cpp
src/Memory/ROM.hpp
src/CableLink/BgbProtocolNetworkInterface.cpp
src/CableLink/BgbProtocolNetworkInterface.hpp
src/CableLink/CableInterface.cpp
src/CableLink/CableInterface.hpp
src/ProcessingUnits/APU.cpp
src/ProcessingUnits/APU.hpp
src/ProcessingUnits/CPU.cpp
src/ProcessingUnits/CPU.hpp
src/ProcessingUnits/Instructions/Instructions.hpp
src/ProcessingUnits/Instructions/CPUInstructions.cpp
src/ProcessingUnits/Instructions/CPUInstructions.hpp
src/ProcessingUnits/Instructions/BasicInstructions.cpp
src/ProcessingUnits/Instructions/BitInstructions.cpp
src/ProcessingUnits/GPU.cpp
src/ProcessingUnits/GPU.hpp
src/ProcessingUnits/StartupCode.cpp
src/Sound/ISound.hpp
src/Sound/SoundPlayer.cpp
src/Sound/SoundPlayer.hpp
src/Timing/Timer.cpp
src/Timing/Timer.hpp
src/Network/BgbHandler.cpp
src/Network/BgbHandler.hpp
src/Network/Exception.hpp
src/Network/ProtocolHandle.hpp
src/ProcessingUnits/SoundChannel/SoundChannel.hpp
src/ProcessingUnits/SoundChannel/SoundChannel.cpp
src/ProcessingUnits/SoundChannel/NoiseChannel.cpp
src/ProcessingUnits/SoundChannel/NoiseChannel.hpp
src/ProcessingUnits/SoundChannel/SquareWaveChannel.cpp
src/ProcessingUnits/SoundChannel/SquareWaveChannel.hpp
src/ProcessingUnits/SoundChannel/ModulableWaveChannel.cpp
src/ProcessingUnits/SoundChannel/ModulableWaveChannel.hpp
src/debugger/CompiledCondition.cpp
src/debugger/CompiledCondition.hpp
)
if (NOT WIN32)
set(OS_SPEC_LIBS X11 pthread)
elseif (NOT MSVC)
set(OS_SPEC_LIBS pthread)
endif (NOT WIN32)
target_link_libraries(
GBEmulator
${SFML_GRAPHICS_LIBRARY}
${SFML_SYSTEM_LIBRARY}
${SFML_WINDOW_LIBRARY}
${SFML_NETWORK_LIBRARY}
${SFML_AUDIO_LIBRARY}
${OS_SPEC_LIBS}
)
add_executable(
tests
src/ProcessingUnits/CPU.cpp
src/ProcessingUnits/CPU.hpp
src/ProcessingUnits/APU.cpp
src/ProcessingUnits/APU.hpp
src/ProcessingUnits/GPU.cpp
src/ProcessingUnits/GPU.hpp
src/Memory/ROM.cpp
src/Memory/ROM.hpp
src/Memory/Memory.cpp
src/Memory/Memory.hpp
src/ProcessingUnits/Instructions/CPUInstructions.cpp
src/ProcessingUnits/Instructions/CPUInstructions.hpp
src/ProcessingUnits/StartupCode.cpp
src/Joypad/JoypadEmulator.hpp
src/CableLink/CableInterface.hpp
src/CableLink/BgbProtocolNetworkInterface.cpp
src/CableLink/BgbProtocolNetworkInterface.hpp
src/LCD/ILCD.hpp
src/LCD/ILCD.cpp
src/CableLink/CableInterface.cpp
src/Timing/Timer.cpp
src/Timing/Timer.hpp
src/ProcessingUnits/Instructions/BasicInstructions.cpp
src/ProcessingUnits/Instructions/BitInstructions.cpp
tests/TestComponents.cpp
tests/TestComponents.hpp
tests/TestCPUInstruction/TestCpuInstruction.cpp
src/Memory/Cartridge.cpp
tests/TestCPUInstruction/DEC.cpp
src/Memory/Cartridge.hpp
tests/communism.hpp
tests/TestCPUInstruction/LD.cpp
tests/TestCPUInstruction/INC.cpp
tests/TestGpu/Test_readVRAM.cpp
src/Sound/ISound.hpp
tests/TestGpu/Test_writeVRAM.cpp
tests/TestGpu/Test_isStatInterrupt.cpp
tests/TestGpu/Test_isVBlankInterrupt.cpp
tests/TestCpu/Test_write.cpp
tests/TestCPUInstruction/arithmetic/ADD16.cpp
tests/TestCPUInstruction/JP.cpp
tests/TestCPUInstruction/JR.cpp
tests/TestCPUInstruction/LD/LD8.cpp
tests/TestCPUInstruction/PUSH.cpp
tests/TestCPUInstruction/POP.cpp
tests/TestCPUInstruction/RET.cpp
tests/TestCPUInstruction/CALL.cpp
tests/TestCartridge/TestMBC1.cpp
tests/TestCPUInstruction/bits/RES.cpp
tests/TestCPUInstruction/bits/SET.cpp
tests/TestCPUInstruction/CALL.cpp
tests/TestCPUInstruction/bits/RESunrefHL.cpp
tests/TestCPUInstruction/bits/SETunrefHL.cpp
tests/TestCPUInstruction/arithmetic/ADD.cpp
tests/TestCPUInstruction/arithmetic/ADC.cpp
tests/TestCPUInstruction/arithmetic/SBC.cpp
)
target_link_libraries(
tests
criterion
)