2019-07-24 22:19:43 +02:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
2019-06-29 15:56:13 +02:00
|
|
|
project(Lightswitch VERSION 1 LANGUAGES CXX)
|
2019-06-29 15:35:24 +02:00
|
|
|
|
2019-09-05 14:42:19 +02:00
|
|
|
set(BUILD_TESTING OFF)
|
2019-07-24 22:19:43 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
2019-09-05 14:42:19 +02:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -flto=full")
|
2019-07-24 22:19:43 +02:00
|
|
|
add_subdirectory("libraries/tinyxml2")
|
|
|
|
add_subdirectory("libraries/fmt")
|
|
|
|
|
2019-06-29 15:53:37 +02:00
|
|
|
set(source_DIR ${CMAKE_SOURCE_DIR}/src/main/cpp)
|
2019-06-29 18:13:36 +02:00
|
|
|
|
2019-07-02 22:00:57 +02:00
|
|
|
include_directories(${source_DIR})
|
2019-06-29 18:13:36 +02:00
|
|
|
|
2019-06-30 15:26:57 +02:00
|
|
|
add_library(lightswitch SHARED
|
|
|
|
${source_DIR}/lightswitch.cpp
|
2019-07-24 22:19:43 +02:00
|
|
|
${source_DIR}/switch/common.cpp
|
2019-09-05 14:42:19 +02:00
|
|
|
${source_DIR}/switch/nce.cpp
|
|
|
|
${source_DIR}/switch/os.cpp
|
2019-07-24 22:19:43 +02:00
|
|
|
${source_DIR}/switch/loader/nro.cpp
|
2019-09-05 14:42:19 +02:00
|
|
|
${source_DIR}/switch/kernel/ipc.cpp
|
|
|
|
${source_DIR}/switch/kernel/svc.cpp
|
|
|
|
${source_DIR}/switch/kernel/service.cpp
|
|
|
|
${source_DIR}/switch/kernel/types/KProcess.cpp
|
|
|
|
${source_DIR}/switch/kernel/types/KThread.cpp
|
2019-09-14 14:41:00 +02:00
|
|
|
${source_DIR}/switch/kernel/types/KSharedMemory.cpp
|
|
|
|
${source_DIR}/switch/kernel/types/KPrivateMemory.cpp
|
2019-07-24 22:19:43 +02:00
|
|
|
)
|
2019-09-05 14:42:19 +02:00
|
|
|
target_link_libraries(lightswitch fmt tinyxml2 android)
|
2019-07-24 22:19:43 +02:00
|
|
|
target_compile_options(lightswitch PRIVATE -Wno-c++17-extensions)
|