forked from samkusin/clemens_iigs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
83 lines (62 loc) · 2.58 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
cmake_minimum_required(VERSION 3.15)
project(clemens_65816 LANGUAGES C)
option(BUILD_TESTING "Build tests" ON)
set (CMAKE_C_STANDARD 11)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
add_library(clemens_65816 STATIC
"${CMAKE_CURRENT_SOURCE_DIR}/clem_debug.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_mem.c"
"${CMAKE_CURRENT_SOURCE_DIR}/emulator.c")
target_include_directories(clemens_65816
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
add_library(clemens_65816_mmio STATIC
"${CMAKE_CURRENT_SOURCE_DIR}/clem_adb.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_audio.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_2img.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_drive.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_drive35.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_iwm.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_mmio.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_rtc.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_scc.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_smartport.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_timer.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_vgc.c"
"${CMAKE_CURRENT_SOURCE_DIR}/clem_woz.c"
"${CMAKE_CURRENT_SOURCE_DIR}/emulator_mmio.c")
target_include_directories(clemens_65816_mmio
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(clemens_65816_mmio PUBLIC clemens_65816)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(clemens_65816_mmio PUBLIC m)
endif()
set(MPACK_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/external/mpack.c"
)
add_library(clemens_65816_serializer STATIC
${MPACK_SOURCES}
"${CMAKE_CURRENT_SOURCE_DIR}/serializer.c")
target_link_libraries(clemens_65816_serializer PUBLIC clemens_65816_mmio)
target_include_directories(clemens_65816_serializer
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
add_library(clemens_65816_render STATIC
${MPACK_SOURCES}
"${CMAKE_CURRENT_SOURCE_DIR}/render.c")
target_link_libraries(clemens_65816_render PUBLIC clemens_65816_mmio)
target_include_directories(clemens_65816_render
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()
add_executable(clemens_65816_emulator
"${CMAKE_CURRENT_SOURCE_DIR}/app.c")
target_link_libraries(clemens_65816_emulator PRIVATE clemens_65816_mmio)
add_executable(clemens_mpack_format
${MPACK_SOURCES}
"${CMAKE_CURRENT_SOURCE_DIR}/clem_mpack_format.c")
target_include_directories(clemens_mpack_format
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
add_subdirectory(iocards)
add_subdirectory(smartport)
add_subdirectory(host)