-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (41 loc) · 1.69 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
cmake_minimum_required(VERSION 3.23)
project(DominosAccountLinker CXX)
include_directories(${LIBOGCDIR}/include)
include_directories(${DEVKITPRO}/portlibs/wii/include)
include_directories(${DEVKITPRO}/portlibs/ppc/include)
include_directories(${DEVKITPRO}/portlibs/ppc/include/freetype2)
include_directories(gui)
include_directories(data)
link_directories(${DEVKITPRO}/portlibs/wii/lib)
link_directories(${DEVKITPRO}/portlibs/ppc/lib)
link_directories(${DEVKITPRO}/libogc/lib/wii)
# Binary linker stuff
set(BIN2S ${DEVKITPRO}/tools/bin/bin2s)
set(BINARY_AS ${DEVKITPPC}/bin/powerpc-eabi-as)
set(MACHDEP "-DGEKKO -mrvl -mcpu=750 -meabi -mhard-float")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_ASM_FLAGS "-x assembler-with-cpp")
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-function -O2 ${CMAKE_CXX_FLAGS} ${MACHDEP}")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-function -O2 ${CMAKE_CXX_FLAGS} ${MACHDEP} -fdiagnostics-color")
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
add_subdirectory(data)
add_subdirectory(gui)
add_executable(dominos-account-linker
main.cpp
menu.cpp
menu.h
config.cpp
config.h
utils.cpp
utils.h
qr.h
)
target_link_libraries(dominos-account-linker PRIVATE png gui `freetype-config --libs` wiiuse bte asnd ogc qrencode mbedcrypto z fat bz2
# It absolutely hates glob here so we have to manually set it ourselves
${CMAKE_CURRENT_SOURCE_DIR}/data/channel_gradient_bottom.png.o
${CMAKE_CURRENT_SOURCE_DIR}/data/channel_gradient_top.png.o
${CMAKE_CURRENT_SOURCE_DIR}/data/bg_stripes.png.o
${CMAKE_CURRENT_SOURCE_DIR}/data/noto_sans_jp_regular.otf.o
)