-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·49 lines (41 loc) · 1.15 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
cmake_minimum_required(VERSION 3.12)
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if(DEFINED ENV{VITASDK})
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
else()
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
endif()
endif()
project(usb_ether)
include("${VITASDK}/share/vita.cmake" REQUIRED)
option(LITE_MODE "Enable only settings, but not host-mode" OFF)
if(LITE_MODE)
set(plugin_name "ether-enabler-lite.skprx")
add_definitions(-DLITE_MODE)
else()
set(plugin_name "ether-enabler.skprx")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
add_executable(ether-enabler
ether-enabler.c
)
set_target_properties(ether-enabler
PROPERTIES LINK_FLAGS
-nostdlib
)
target_link_libraries(ether-enabler
SceDebugForDriver_stub
SceKernelSuspendForDriver_stub
SceModulemgrForDriver_stub
SceSysmemForDriver_stub
SceSysclibForDriver_stub
SceSysrootForDriver_stub
SceUsbServForDriver_stub
SceSblACMgrForDriver_stub
taihenForKernel_stub
taihenModuleUtils_stub
)
vita_create_self(${plugin_name} ether-enabler
CONFIG ${CMAKE_SOURCE_DIR}/ether-enabler.yml
UNSAFE
)