mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-19 21:13:12 -07:00
Make Borealis GUI more generic to build (#408)
This commit is contained in:
parent
402e7f01ee
commit
4da09f75f3
16 changed files with 168 additions and 167 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,3 +26,4 @@ compile_commands.json
|
|||
.ccls-cache
|
||||
.cache/
|
||||
.gdb_history
|
||||
chiaki.conf
|
||||
|
|
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -13,6 +13,6 @@
|
|||
[submodule "android/app/src/main/cpp/oboe"]
|
||||
path = android/app/src/main/cpp/oboe
|
||||
url = https://github.com/google/oboe
|
||||
[submodule "third-party/borealis"]
|
||||
path = third-party/borealis
|
||||
[submodule "switch/borealis"]
|
||||
path = switch/borealis
|
||||
url = https://github.com/natinusala/borealis.git
|
||||
|
|
|
@ -13,7 +13,7 @@ option(CHIAKI_ENABLE_TESTS "Enable tests for Chiaki" ON)
|
|||
option(CHIAKI_ENABLE_CLI "Enable CLI for Chiaki" OFF)
|
||||
option(CHIAKI_ENABLE_GUI "Enable Qt GUI" ON)
|
||||
option(CHIAKI_ENABLE_ANDROID "Enable Android (Use only as part of the Gradle Project)" OFF)
|
||||
option(CHIAKI_ENABLE_SWITCH "Enable Nintendo Switch (Requires devKitPro libnx)" OFF)
|
||||
option(CHIAKI_ENABLE_BOREALIS "Enable Borealis GUI (For Nintendo Switch or PC)" OFF)
|
||||
tri_option(CHIAKI_ENABLE_SETSU "Enable libsetsu for touchpad input from controller" AUTO)
|
||||
option(CHIAKI_LIB_ENABLE_OPUS "Use Opus as part of Chiaki Lib" ON)
|
||||
tri_option(CHIAKI_ENABLE_PI_DECODER "Enable Raspberry Pi-specific video decoder (requires libraspberrypi0 and libraspberrypi-doc)" AUTO)
|
||||
|
@ -39,33 +39,16 @@ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
|
|||
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
|
||||
include(CPack)
|
||||
|
||||
set(CHIAKI_IS_SWITCH ${NSWITCH})
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/setsu/cmake")
|
||||
|
||||
# configure nintendo switch toolchain
|
||||
if(CHIAKI_ENABLE_SWITCH)
|
||||
# load switch.cmake toolchain form ./cmake folder
|
||||
# include(switch)
|
||||
# to compile borealis third party
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
# TODO check if android ... or other versions are enabled
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
if(CHIAKI_IS_SWITCH)
|
||||
# force mbedtls as crypto lib
|
||||
set(CHIAKI_LIB_ENABLE_MBEDTLS ON)
|
||||
|
||||
if(CHIAKI_SWITCH_ENABLE_LINUX)
|
||||
# CHIAKI_SWITCH_ENABLE_LINUX is a special testing version
|
||||
# the aim is to troubleshoot nitendo switch chiaki verison
|
||||
# from a x86 linux os
|
||||
add_definitions(-DCHIAKI_SWITCH_ENABLE_LINUX)
|
||||
add_definitions(-DBOREALIS_RESOURCES="./switch/res/")
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
add_definitions(-DDEBUG_OPENGL)
|
||||
else()
|
||||
add_definitions(-D__SWITCH__)
|
||||
# use symbolic links to load font ..
|
||||
add_definitions(-DBOREALIS_RESOURCES="romfs:/")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
add_definitions(-D__SWITCH__)
|
||||
endif()
|
||||
|
||||
if(CHIAKI_USE_SYSTEM_JERASURE)
|
||||
|
@ -167,6 +150,6 @@ if(CHIAKI_ENABLE_ANDROID)
|
|||
add_subdirectory(android/app)
|
||||
endif()
|
||||
|
||||
if(CHIAKI_ENABLE_SWITCH)
|
||||
if(CHIAKI_ENABLE_BOREALIS)
|
||||
add_subdirectory(switch)
|
||||
endif()
|
||||
|
|
|
@ -42,6 +42,11 @@ function(join OUTPUT GLUE)
|
|||
endfunction()
|
||||
|
||||
function (_ffmpeg_find component headername)
|
||||
if(TARGET "FFMPEG::${component}")
|
||||
# already found before
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Try pkg-config first
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(FFMPEG_${component} lib${component} IMPORTED_TARGET)
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
|
||||
# Find DEVKITPRO
|
||||
if(NOT DEFINED ENV{DEVKITPRO} OR NOT DEFINED ENV{PORTLIBS_PREFIX})
|
||||
set(DEVKITPRO "$ENV{DEVKITPRO}" CACHE PATH "Path to DevKitPro")
|
||||
set(PORTLIBS_PREFIX "$ENV{PORTLIBS_PREFIX}" CACHE PATH "Path to portlibs inside DevKitPro")
|
||||
if(NOT DEVKITPRO OR NOT PORTLIBS_PREFIX)
|
||||
message(FATAL_ERROR "Please set DEVKITPRO & PORTLIBS_PREFIX env before calling cmake. https://devkitpro.org/wiki/Getting_Started")
|
||||
endif()
|
||||
|
||||
set(DEVKITPRO "$ENV{DEVKITPRO}")
|
||||
set(PORTLIBS_PREFIX "$ENV{PORTLIBS_PREFIX}")
|
||||
|
||||
# include devkitpro toolchain
|
||||
include("${DEVKITPRO}/switch.cmake")
|
||||
|
||||
set(NSWITCH TRUE)
|
||||
|
||||
# Enable gcc -g, to use
|
||||
# /opt/devkitpro/devkitA64/bin/aarch64-none-elf-addr2line -e build_switch/switch/chiaki -f -p -C -a 0xCCB5C
|
||||
# set(CMAKE_BUILD_TYPE Debug)
|
||||
|
@ -60,20 +62,21 @@ function(__add_nacp target APP_TITLE APP_AUTHOR APP_VERSION)
|
|||
)
|
||||
endfunction()
|
||||
|
||||
function(add_nro_target target title author version icon romfs)
|
||||
get_filename_component(target_we ${target} NAME_WE)
|
||||
if(NOT ${target_we}.nacp)
|
||||
__add_nacp(${target_we}.nacp ${title} ${author} ${version})
|
||||
function(add_nro_target output_name target title author version icon romfs)
|
||||
if(NOT ${output_name}.nacp)
|
||||
__add_nacp(${output_name}.nacp ${title} ${author} ${version})
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${output_name}.nro
|
||||
COMMAND ${ELF2NRO} $<TARGET_FILE:${target}>
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output_name}.nro
|
||||
--icon=${icon}
|
||||
--nacp=${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nacp
|
||||
--nacp=${CMAKE_CURRENT_BINARY_DIR}/${output_name}.nacp
|
||||
--romfsdir=${romfs}
|
||||
DEPENDS ${target} ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nacp
|
||||
DEPENDS ${target} ${CMAKE_CURRENT_BINARY_DIR}/${output_name}.nacp
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(${target_we}_nro ALL SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro)
|
||||
add_custom_target(${output_name}_nro ALL SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${output_name}.nro)
|
||||
endfunction()
|
||||
|
||||
set(CMAKE_USE_SYSTEM_ENVIRONMENT_PATH OFF)
|
||||
set(CMAKE_PREFIX_PATH "/")
|
||||
|
|
|
@ -23,7 +23,7 @@ typedef struct chiaki_stop_pipe_t
|
|||
{
|
||||
#ifdef _WIN32
|
||||
WSAEVENT event;
|
||||
#elif defined(__SWITCH__) || defined(CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
#elif defined(__SWITCH__)
|
||||
// due to a lack pipe/event/socketpair
|
||||
// on switch env, we use a physical socket
|
||||
// to send/trigger the cancel signal
|
||||
|
|
|
@ -19,7 +19,7 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_stop_pipe_init(ChiakiStopPipe *stop_pipe)
|
|||
stop_pipe->event = WSACreateEvent();
|
||||
if(stop_pipe->event == WSA_INVALID_EVENT)
|
||||
return CHIAKI_ERR_UNKNOWN;
|
||||
#elif defined(__SWITCH__) || defined(CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
#elif defined(__SWITCH__)
|
||||
// currently pipe or socketpare are not available on switch
|
||||
// use a custom udp socket as pipe
|
||||
|
||||
|
@ -64,7 +64,7 @@ CHIAKI_EXPORT void chiaki_stop_pipe_fini(ChiakiStopPipe *stop_pipe)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
WSACloseEvent(stop_pipe->event);
|
||||
#elif defined(__SWITCH__) || defined(CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
#elif defined(__SWITCH__)
|
||||
close(stop_pipe->fd);
|
||||
#else
|
||||
close(stop_pipe->fds[0]);
|
||||
|
@ -76,7 +76,7 @@ CHIAKI_EXPORT void chiaki_stop_pipe_stop(ChiakiStopPipe *stop_pipe)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
WSASetEvent(stop_pipe->event);
|
||||
#elif defined(__SWITCH__) || defined(CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
#elif defined(__SWITCH__)
|
||||
// send to local socket (FIXME MSG_CONFIRM)
|
||||
sendto(stop_pipe->fd, "\x00", 1, 0,
|
||||
(struct sockaddr*)&stop_pipe->addr, sizeof(struct sockaddr_in));
|
||||
|
@ -120,7 +120,7 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_stop_pipe_select_single(ChiakiStopPipe *sto
|
|||
#else
|
||||
fd_set rfds;
|
||||
FD_ZERO(&rfds);
|
||||
#if defined(__SWITCH__) || defined(CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
#if defined(__SWITCH__)
|
||||
// push udp local socket as fd
|
||||
int stop_fd = stop_pipe->fd;
|
||||
#else
|
||||
|
@ -244,7 +244,7 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_stop_pipe_reset(ChiakiStopPipe *stop_pipe)
|
|||
#ifdef _WIN32
|
||||
BOOL r = WSAResetEvent(stop_pipe->event);
|
||||
return r ? CHIAKI_ERR_SUCCESS : CHIAKI_ERR_UNKNOWN;
|
||||
#elif defined(__SWITCH__) || defined(CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
#elif defined(__SWITCH__)
|
||||
//FIXME
|
||||
uint8_t v;
|
||||
int r;
|
||||
|
|
|
@ -3,40 +3,36 @@
|
|||
set -xveo pipefail
|
||||
|
||||
arg1=$1
|
||||
CHIAKI_SWITCH_ENABLE_LINUX="ON"
|
||||
build="./build"
|
||||
if [ "$arg1" != "linux" ]; then
|
||||
CHIAKI_SWITCH_ENABLE_LINUX="OFF"
|
||||
# source /opt/devkitpro/switchvars.sh
|
||||
# toolchain="${DEVKITPRO}/switch.cmake"
|
||||
toolchain="cmake/switch.cmake"
|
||||
export PORTLIBS_PREFIX="$(${DEVKITPRO}/portlibs_prefix.sh switch)"
|
||||
build="./build_switch"
|
||||
# source /opt/devkitpro/switchvars.sh
|
||||
# toolchain="${DEVKITPRO}/switch.cmake"
|
||||
toolchain="cmake/switch.cmake"
|
||||
export PORTLIBS_PREFIX="$(${DEVKITPRO}/portlibs_prefix.sh switch)"
|
||||
build="./build_switch"
|
||||
fi
|
||||
|
||||
SCRIPTDIR=$(dirname "$0")
|
||||
BASEDIR=$(realpath "${SCRIPTDIR}/../../")
|
||||
|
||||
build_chiaki (){
|
||||
pushd "${BASEDIR}"
|
||||
#rm -rf ./build
|
||||
pushd "${BASEDIR}"
|
||||
#rm -rf ./build
|
||||
|
||||
cmake -B "${build}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${toolchain} \
|
||||
-DCHIAKI_ENABLE_TESTS=OFF \
|
||||
-DCHIAKI_ENABLE_CLI=OFF \
|
||||
-DCHIAKI_ENABLE_GUI=OFF \
|
||||
-DCHIAKI_ENABLE_ANDROID=OFF \
|
||||
-DCHIAKI_ENABLE_SWITCH=ON \
|
||||
-DCHIAKI_SWITCH_ENABLE_LINUX="${CHIAKI_SWITCH_ENABLE_LINUX}" \
|
||||
-DCHIAKI_LIB_ENABLE_MBEDTLS=ON \
|
||||
# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
# -DCMAKE_FIND_DEBUG_MODE=ON
|
||||
cmake -B "${build}" \
|
||||
-GNinja \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${toolchain} \
|
||||
-DCHIAKI_ENABLE_TESTS=OFF \
|
||||
-DCHIAKI_ENABLE_CLI=OFF \
|
||||
-DCHIAKI_ENABLE_GUI=OFF \
|
||||
-DCHIAKI_ENABLE_ANDROID=OFF \
|
||||
-DCHIAKI_ENABLE_BOREALIS=ON \
|
||||
-DCHIAKI_LIB_ENABLE_MBEDTLS=ON \
|
||||
# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
# -DCMAKE_FIND_DEBUG_MODE=ON
|
||||
|
||||
pushd "${BASEDIR}/${build}"
|
||||
make -j8
|
||||
popd
|
||||
popd
|
||||
ninja -C "${build}"
|
||||
popd
|
||||
}
|
||||
|
||||
build_chiaki
|
||||
|
|
|
@ -1,12 +1,93 @@
|
|||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
##################
|
||||
# borealis dependency
|
||||
##################
|
||||
|
||||
# do not include
|
||||
# borealis/library/lib/switch_wrapper.c
|
||||
# switch functions are in switch/src/main.cpp
|
||||
set(BOREALIS_SOURCE
|
||||
borealis/library/lib/extern/libretro-common/features/features_cpu.c
|
||||
borealis/library/lib/extern/libretro-common/encodings/encoding_utf.c
|
||||
borealis/library/lib/extern/libretro-common/compat/compat_strl.c
|
||||
borealis/library/lib/extern/nxfmtwrapper/format.cpp
|
||||
borealis/library/lib/extern/nanovg/nanovg.c
|
||||
borealis/library/lib/extern/glad/glad.c
|
||||
borealis/library/lib/scroll_view.cpp
|
||||
borealis/library/lib/style.cpp
|
||||
borealis/library/lib/table.cpp
|
||||
borealis/library/lib/task_manager.cpp
|
||||
borealis/library/lib/progress_display.cpp
|
||||
borealis/library/lib/staged_applet_frame.cpp
|
||||
borealis/library/lib/applet_frame.cpp
|
||||
borealis/library/lib/hint.cpp
|
||||
borealis/library/lib/image.cpp
|
||||
borealis/library/lib/logger.cpp
|
||||
borealis/library/lib/swkbd.cpp
|
||||
borealis/library/lib/crash_frame.cpp
|
||||
borealis/library/lib/header.cpp
|
||||
borealis/library/lib/progress_spinner.cpp
|
||||
borealis/library/lib/layer_view.cpp
|
||||
borealis/library/lib/notification_manager.cpp
|
||||
borealis/library/lib/rectangle.cpp
|
||||
borealis/library/lib/application.cpp
|
||||
borealis/library/lib/box_layout.cpp
|
||||
borealis/library/lib/sidebar.cpp
|
||||
borealis/library/lib/dropdown.cpp
|
||||
borealis/library/lib/popup_frame.cpp
|
||||
borealis/library/lib/repeating_task.cpp
|
||||
borealis/library/lib/absolute_layout.cpp
|
||||
borealis/library/lib/i18n.cpp
|
||||
borealis/library/lib/tab_frame.cpp
|
||||
borealis/library/lib/thumbnail_frame.cpp
|
||||
borealis/library/lib/animations.cpp
|
||||
borealis/library/lib/dialog.cpp
|
||||
borealis/library/lib/view.cpp
|
||||
borealis/library/lib/list.cpp
|
||||
borealis/library/lib/button.cpp
|
||||
borealis/library/lib/label.cpp
|
||||
borealis/library/lib/theme.cpp
|
||||
borealis/library/lib/material_icon.cpp)
|
||||
|
||||
add_library(borealis STATIC ${BOREALIS_SOURCE})
|
||||
set_property(TARGET borealis PROPERTY CXX_STANDARD 17)
|
||||
target_include_directories(borealis PUBLIC
|
||||
borealis/library/include
|
||||
borealis/library/include/borealis/extern
|
||||
borealis/library/include/borealis/extern/glad
|
||||
borealis/library/include/borealis/extern/nanovg
|
||||
borealis/library/include/borealis/extern/libretro-common
|
||||
borealis/library/lib/extern/fmt/include)
|
||||
|
||||
find_package(glfw3 REQUIRED)
|
||||
find_library(EGL EGL)
|
||||
find_library(GLAPI glapi)
|
||||
find_library(DRM_NOUVEAU drm_nouveau)
|
||||
target_link_libraries(borealis
|
||||
glfw
|
||||
${EGL}
|
||||
${GLAPI}
|
||||
${DRM_NOUVEAU})
|
||||
|
||||
if(CHIAKI_IS_SWITCH)
|
||||
target_compile_definitions(borealis PUBLIC
|
||||
BOREALIS_RESOURCES="romfs:/")
|
||||
else()
|
||||
target_compile_definitions(borealis PUBLIC
|
||||
BOREALIS_RESOURCES="./switch/res/")
|
||||
endif()
|
||||
|
||||
|
||||
##################
|
||||
# chiaki with borealis
|
||||
##################
|
||||
|
||||
find_package(FFMPEG REQUIRED COMPONENTS avcodec avutil swscale)
|
||||
find_library(SDL2 SDL2)
|
||||
find_library(SWRESAMPLE swresample)
|
||||
|
||||
# find -type f | grep -P '\.(h|cpp)$' | sed 's#\./#\t\t#g'
|
||||
add_executable(chiaki WIN32
|
||||
add_executable(chiaki-borealis WIN32
|
||||
src/discoverymanager.cpp
|
||||
src/settings.cpp
|
||||
src/io.cpp
|
||||
|
@ -14,9 +95,13 @@ add_executable(chiaki WIN32
|
|||
src/main.cpp
|
||||
src/gui.cpp)
|
||||
|
||||
target_include_directories(chiaki PRIVATE include)
|
||||
set_target_properties(chiaki-borealis PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
OUTPUT_NAME chiaki)
|
||||
|
||||
target_link_libraries(chiaki
|
||||
target_include_directories(chiaki-borealis PRIVATE include)
|
||||
|
||||
target_link_libraries(chiaki-borealis
|
||||
chiaki-lib
|
||||
borealis
|
||||
${SDL2}
|
||||
|
@ -26,21 +111,24 @@ target_link_libraries(chiaki
|
|||
${SWRESAMPLE}
|
||||
${SWSCALE})
|
||||
|
||||
# OS links
|
||||
if(CHIAKI_SWITCH_ENABLE_LINUX)
|
||||
target_link_libraries(chiaki dl)
|
||||
else()
|
||||
if(CHIAKI_IS_SWITCH)
|
||||
# libnx is forced by the switch toolchain
|
||||
find_library(Z z)
|
||||
find_library(GLAPI glapi)
|
||||
find_library(DRM_NOUVEAU drm_nouveau)
|
||||
target_link_libraries(chiaki ${Z} ${GLAPI} ${DRM_NOUVEAU})
|
||||
find_library(GLAPI glapi) # TODO: make it transitive from borealis
|
||||
find_library(DRM_NOUVEAU drm_nouveau) # TODO: make it transitive from borealis
|
||||
target_link_libraries(chiaki-borealis ${Z} ${GLAPI} ${DRM_NOUVEAU})
|
||||
endif()
|
||||
|
||||
install(TARGETS chiaki
|
||||
install(TARGETS chiaki-borealis
|
||||
RUNTIME DESTINATION bin
|
||||
BUNDLE DESTINATION bin)
|
||||
|
||||
if(CHIAKI_ENABLE_SWITCH AND NOT CHIAKI_SWITCH_ENABLE_LINUX)
|
||||
add_nro_target(chiaki "chiaki" "Chiaki team" "${CHIAKI_VERSION}" "${CMAKE_SOURCE_DIR}/switch/res/icon.jpg" "${CMAKE_SOURCE_DIR}/switch/res")
|
||||
if(CHIAKI_IS_SWITCH)
|
||||
add_nro_target(chiaki
|
||||
chiaki-borealis
|
||||
"chiaki"
|
||||
"Chiaki team"
|
||||
"${CHIAKI_VERSION}"
|
||||
"${CMAKE_SOURCE_DIR}/switch/res/icon.jpg"
|
||||
"${CMAKE_SOURCE_DIR}/switch/res")
|
||||
endif()
|
||||
|
|
|
@ -1 +1 @@
|
|||
../../../third-party/borealis/resources/i18n/en-US
|
||||
../../borealis/resources/i18n/en-US
|
|
@ -1 +1 @@
|
|||
../../third-party/borealis/resources/inter
|
||||
../borealis/resources/inter
|
|
@ -1 +1 @@
|
|||
../../third-party/borealis/resources/material
|
||||
../borealis/resources/material
|
|
@ -318,7 +318,7 @@ bool IO::FreeVideo()
|
|||
|
||||
bool IO::ReadUserKeyboard(char *buffer, size_t buffer_size)
|
||||
{
|
||||
#ifdef CHIAKI_SWITCH_ENABLE_LINUX
|
||||
#ifndef __SWITCH__
|
||||
// use cin to get user input from linux
|
||||
std::cin.getline(buffer, buffer_size);
|
||||
CHIAKI_LOGI(this->log, "Got user input: %s\n", buffer);
|
||||
|
|
|
@ -20,7 +20,7 @@ bool appletMainLoop()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef CHIAKI_SWITCH_ENABLE_LINUX
|
||||
#if __SWITCH__
|
||||
#define CHIAKI_ENABLE_SWITCH_NXLINK 1
|
||||
#endif
|
||||
|
||||
|
@ -109,15 +109,11 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
// init chiaki lib
|
||||
ChiakiLog log;
|
||||
#if defined(CHIAKI_ENABLE_SWITCH_NXLINK) || defined(CHIAKI_SWITCH_ENABLE_LINUX)
|
||||
#ifdef __SWITCH__
|
||||
chiaki_log_init(&log, CHIAKI_LOG_ALL ^ CHIAKI_LOG_VERBOSE, chiaki_log_cb_print, NULL);
|
||||
#else
|
||||
chiaki_log_init(&log, CHIAKI_LOG_ALL, chiaki_log_cb_print, NULL);
|
||||
#endif
|
||||
#else
|
||||
#if defined(__SWITCH__) && !defined(CHIAKI_ENABLE_SWITCH_NXLINK)
|
||||
// null log for switch version
|
||||
chiaki_log_init(&log, 0, chiaki_log_cb_print, NULL);
|
||||
#else
|
||||
chiaki_log_init(&log, CHIAKI_LOG_ALL ^ CHIAKI_LOG_VERBOSE, chiaki_log_cb_print, NULL);
|
||||
#endif
|
||||
|
||||
// load chiaki lib
|
||||
|
|
71
third-party/CMakeLists.txt
vendored
71
third-party/CMakeLists.txt
vendored
|
@ -52,74 +52,3 @@ if(NOT CHIAKI_USE_SYSTEM_JERASURE)
|
|||
|
||||
add_library(Jerasure::Jerasure ALIAS jerasure)
|
||||
endif()
|
||||
|
||||
##################
|
||||
# borealis
|
||||
##################
|
||||
|
||||
if(CHIAKI_ENABLE_SWITCH)
|
||||
# do not include
|
||||
# borealis/library/lib/switch_wrapper.c
|
||||
# switch functions are in switch/src/main.cpp
|
||||
set(BOREALIS_SOURCE
|
||||
borealis/library/lib/extern/libretro-common/features/features_cpu.c
|
||||
borealis/library/lib/extern/libretro-common/encodings/encoding_utf.c
|
||||
borealis/library/lib/extern/libretro-common/compat/compat_strl.c
|
||||
borealis/library/lib/extern/nxfmtwrapper/format.cpp
|
||||
borealis/library/lib/extern/nanovg/nanovg.c
|
||||
borealis/library/lib/extern/glad/glad.c
|
||||
borealis/library/lib/scroll_view.cpp
|
||||
borealis/library/lib/style.cpp
|
||||
borealis/library/lib/table.cpp
|
||||
borealis/library/lib/task_manager.cpp
|
||||
borealis/library/lib/progress_display.cpp
|
||||
borealis/library/lib/staged_applet_frame.cpp
|
||||
borealis/library/lib/applet_frame.cpp
|
||||
borealis/library/lib/hint.cpp
|
||||
borealis/library/lib/image.cpp
|
||||
borealis/library/lib/logger.cpp
|
||||
borealis/library/lib/swkbd.cpp
|
||||
borealis/library/lib/crash_frame.cpp
|
||||
borealis/library/lib/header.cpp
|
||||
borealis/library/lib/progress_spinner.cpp
|
||||
borealis/library/lib/layer_view.cpp
|
||||
borealis/library/lib/notification_manager.cpp
|
||||
borealis/library/lib/rectangle.cpp
|
||||
borealis/library/lib/application.cpp
|
||||
borealis/library/lib/box_layout.cpp
|
||||
borealis/library/lib/sidebar.cpp
|
||||
borealis/library/lib/dropdown.cpp
|
||||
borealis/library/lib/popup_frame.cpp
|
||||
borealis/library/lib/repeating_task.cpp
|
||||
borealis/library/lib/absolute_layout.cpp
|
||||
borealis/library/lib/i18n.cpp
|
||||
borealis/library/lib/tab_frame.cpp
|
||||
borealis/library/lib/thumbnail_frame.cpp
|
||||
borealis/library/lib/animations.cpp
|
||||
borealis/library/lib/dialog.cpp
|
||||
borealis/library/lib/view.cpp
|
||||
borealis/library/lib/list.cpp
|
||||
borealis/library/lib/button.cpp
|
||||
borealis/library/lib/label.cpp
|
||||
borealis/library/lib/theme.cpp
|
||||
borealis/library/lib/material_icon.cpp)
|
||||
|
||||
add_library(borealis STATIC ${BOREALIS_SOURCE})
|
||||
target_include_directories(borealis PUBLIC
|
||||
borealis/library/include
|
||||
borealis/library/include/borealis/extern
|
||||
borealis/library/include/borealis/extern/glad
|
||||
borealis/library/include/borealis/extern/nanovg
|
||||
borealis/library/include/borealis/extern/libretro-common
|
||||
borealis/library/lib/extern/fmt/include)
|
||||
|
||||
find_package(glfw3 REQUIRED)
|
||||
find_library(EGL EGL)
|
||||
find_library(GLAPI glapi)
|
||||
find_library(DRM_NOUVEAU drm_nouveau)
|
||||
target_link_libraries(borealis
|
||||
glfw
|
||||
${EGL}
|
||||
${GLAPI}
|
||||
${DRM_NOUVEAU})
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue