-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
118 lines (108 loc) · 2.77 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
cmake_minimum_required(VERSION 3.16.3)
# or use: /opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake
include(/opt/devkitpro/cmake/Switch.cmake)
project(ezremote-client VERSION 1.0.5 LANGUAGES C CXX)
set(TITLE_NAME "ezRemote Client")
set(PROJECT_AUTHOR "cy33hc")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
set(TARGET ${PROJECT_NAME})
set(IMGUI_DIR third_parties/imgui)
set(LIBNSBMP third_parties/libnsbmp)
add_definitions("-D_U_=")
add_definitions("-DHAVE_STRING_H -DHAVE_STDLIB_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H")
include_directories(
source
source/pugixml
third_parties
${LIBNSBMP}
)
add_executable(${TARGET}
source/pugixml/pugixml.cpp
source/clients/apache.cpp
source/clients/archiveorg.cpp
source/clients/baseclient.cpp
source/clients/iis.cpp
source/clients/myrient.cpp
source/clients/nginx.cpp
source/clients/npxserve.cpp
source/clients/rclone.cpp
source/clients/smbclient.cpp
source/clients/ftpclient.cpp
source/clients/webdav.cpp
source/main.cpp
source/inifile.c
source/lang.cpp
source/fs.cpp
source/actions.cpp
source/gui.cpp
source/windows.cpp
source/config.cpp
source/ime_dialog.cpp
source/zip_util.cpp
source/imgui_impl_switch.cpp
source/textures.cpp
${LIBNSBMP}/libnsbmp.c
${IMGUI_DIR}/imgui.cpp
${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_tables.cpp
${IMGUI_DIR}/imgui_widgets.cpp
${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp
)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_definitions(${TARGET} PUBLIC
IMGUI_DISABLE_OBSOLETE_KEYIO
IMGUI_DISABLE_OBSOLETE_FUNCTIONS
IMGUI_IMPL_OPENGL_LOADER_GLAD
IMGUI_DISABLE_DEMO_WINDOWS
IMGUI_DISABLE_DEBUG_TOOLS
IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
IMGUI_DISABLE_WIN32_FUNCTIONS
IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
IMGUI_ENABLE_FREETYPE
)
target_link_libraries(${TARGET} PUBLIC
lexbor_static
archive
zstd
lz4
lzma
expat
httpclient
smb2
glad
EGL
glapi
drm_nouveau
freetype
bz2
turbojpeg
jpeg
png
webp
curl
mbedtls
mbedcrypto
mbedx509
z
)
target_include_directories(${TARGET} PUBLIC
${DEVKITPRO}/portlibs/switch/include
${DEVKITPRO}/portlibs/switch/include/freetype2
${IMGUI_DIR})
file(COPY icons DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/romfs)
file(COPY lang DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/romfs)
file(COPY certs DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/romfs)
dkp_add_asset_target(${TARGET}_romfs ${CMAKE_CURRENT_BINARY_DIR}/romfs)
nx_generate_nacp(${TARGET}.nacp
NAME ${TITLE_NAME}
AUTHOR ${PROJECT_AUTHOR}
)
nx_create_nro(${TARGET}
NACP ${TARGET}.nacp
ROMFS ${TARGET}_romfs
ICON ${CMAKE_SOURCE_DIR}/icon.jpg
)