-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (41 loc) · 1.38 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
cmake_minimum_required(VERSION 3.18)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
project(vecxl VERSION 0.0.1 LANGUAGES C CXX)
add_compile_options(-Wall -Wextra -pedantic -Werror)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 17)
# requirements
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_gfx REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(libusb REQUIRED libusb-1.0)
# library: helios_dac
add_library(helios_dac SHARED
dep/helios_dac/sdk/HeliosDacAPI.cpp
dep/helios_dac/sdk/HeliosDac.cpp)
target_include_directories(helios_dac PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/dep/helios_dac/sdk)
target_compile_options(helios_dac PUBLIC ${libusb_CFLAGS} -Wno-unknown-pragmas -Wno-unused-private-field)
target_link_libraries(helios_dac ${libusb_LINK_LIBRARIES})
# executable: vecxl
add_executable(vecxl
src/vecxl.cc
dep/vecx/e6809.c
dep/vecx/e8910.c
dep/vecx/vecx.c)
target_include_directories(vecxl
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/dep/vecx)
target_link_libraries(vecxl
SDL2::Main
SDL2::Image
SDL2::GFX
helios_dac)
# tools
add_executable(joy tools/joy.cc)
target_link_libraries(joy SDL2::Main)
add_executable(hel tools/hel.cc)
target_link_libraries(hel helios_dac)
# data
foreach(rom fastrom.dat rom.dat)
file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/dep/vecx/${rom} ${rom} SYMBOLIC)
endforeach()