-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (29 loc) · 985 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
cmake_minimum_required(VERSION 3.21)
project(zelda64 C)
if (MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif ()
# Library.
add_library(zelda64 SHARED
lib/util.h
include/zelda64/zelda64.h
lib/rom.c include/zelda64/rom.h
lib/dma.c include/zelda64/dma.h
lib/yaz0.c include/zelda64/yaz0.h
lib/crc32.c include/zelda64/crc32.h)
set_target_properties(zelda64 PROPERTIES
C_STANDARD 23
C_STANDARD_REQUIRED ON
C_EXTENSIONS OFF)
target_include_directories(zelda64 PRIVATE ${CMAKE_SOURCE_DIR}/include)
# Binary based on the library.
add_executable(zelda64-bin src/main.c
src/compress.c src/compress.h
src/decompress.c src/decompress.h)
set_target_properties(zelda64-bin PROPERTIES
C_STANDARD 23
C_STANDARD_REQUIRED ON
C_EXTENSIONS OFF)
target_link_libraries(zelda64-bin
PRIVATE zelda64)
target_include_directories(zelda64-bin PRIVATE ${CMAKE_SOURCE_DIR}/include)