forked from zeldaret/botw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
67 lines (52 loc) · 2.13 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
cmake_minimum_required(VERSION 3.13)
project(uking CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Use response files when linking objects because of the large number of source files
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS ON)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-fcolor-diagnostics)
# Required to silence "unused argument" warnings for -stdlib=libc++ when using distcc
add_compile_options(-Wno-unused-command-line-argument)
# Required to fix source paths in debug info when using distcc
add_compile_options(-fdebug-prefix-map=/tmp=${CMAKE_CURRENT_BINARY_DIR})
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_compile_definitions(UKING_NX_V150)
add_executable(uking)
target_include_directories(uking PRIVATE src)
target_compile_definitions(uking PRIVATE NON_MATCHING)
target_compile_options(uking PRIVATE -fno-rtti -fno-exceptions)
target_compile_options(uking PRIVATE -fno-strict-aliasing)
target_compile_options(uking PRIVATE -Wall -Wextra -Wdeprecated)
target_compile_options(uking PRIVATE -Wno-unused-parameter -Wno-unused-private-field)
target_compile_options(uking PRIVATE -Wno-invalid-offsetof)
target_compile_options(uking PRIVATE -Wextra-semi)
set(NN_SDK_MAJOR 4)
set(NN_SDK_MINOR 4)
set(NN_SDK_PATCH 0)
set(NN_SDK_TYPE "Release")
# todo: figure out actual number, in between odyssey and splatoon
set(NN_WARE_MAJOR 1)
set(NN_WARE_MINOR 6)
set(NN_WARE_PATCH 1)
add_subdirectory(lib/NintendoSDK)
target_link_libraries(uking PUBLIC NintendoSDK)
add_subdirectory(lib/sead)
target_link_libraries(uking PUBLIC sead)
add_subdirectory(lib/agl)
target_link_libraries(uking PUBLIC agl)
add_subdirectory(lib/aal)
target_link_libraries(uking PRIVATE aal)
add_subdirectory(lib/gsys)
target_link_libraries(uking PRIVATE gsys)
add_subdirectory(lib/EventFlow)
target_link_libraries(uking PRIVATE evfl)
add_subdirectory(lib/xlink2)
target_link_libraries(uking PRIVATE xlink2)
add_subdirectory(lib/hkStubs)
target_link_libraries(uking PRIVATE hkStubs)
add_subdirectory(src)