From 28f266302fbeea2d75d5a62de651d464ab380798 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Sun, 4 Jul 2021 18:52:48 +0200 Subject: Add Nintendo Switch initial support --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5396d3b4..b687124a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,10 @@ message(STATUS "Building ${CMAKE_PROJECT_NAME} GIT SHA1: ${GIT_SHA1}") if(WIN32) set(${PROJECT}_AUDIOS "OAL" "MSS") +elseif(NINTENDO_SWITCH) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/nx") + include(NXFunctions) + set(${PROJECT}_AUDIOS "OAL") else() set(${PROJECT}_AUDIOS "OAL") endif() @@ -66,6 +70,8 @@ if(${PROJECT}_INSTALL) set(os "-apple") elseif(UNIX) set(os "-linux") + elseif(NINTENDO_SWITCH) + set(os "-switch") else() set(compiler "-UNK") message(WARNING "Unknown os. Created cpack package will be wrong. (override using cpack -P)") -- cgit v1.2.3 From a247d533675a3ffa3b5f3722bef4d55e5a912d03 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 5 Jul 2021 16:02:10 +0200 Subject: cmake: fix OpenAL on Switch + using X11 on Linux --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b687124a..8bfe3656 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.14) set(EXECUTABLE re3) set(PROJECT RE3) -- cgit v1.2.3 From 5cab196718d94c1ddfe1ddda0490a639cac7fde0 Mon Sep 17 00:00:00 2001 From: Adrian Graber Date: Mon, 12 Jul 2021 02:27:45 +0200 Subject: Finish cmake stuff for Switch build * SDL2 for OpenAL not needed anymore * Add re3_platform_target function and use that instead of manually building NRO --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bfe3656..adf3c29f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,18 +4,25 @@ set(EXECUTABLE re3) set(PROJECT RE3) project(${EXECUTABLE} C CXX) +set(${PROJECT}_AUTHOR "${PROJECT} Team") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") include(GetGitRevisionDescription) get_git_head_revision(GIT_REFSPEC GIT_SHA1 "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR") message(STATUS "Building ${CMAKE_PROJECT_NAME} GIT SHA1: ${GIT_SHA1}") -if(WIN32) - set(${PROJECT}_AUDIOS "OAL" "MSS") -elseif(NINTENDO_SWITCH) +if(NINTENDO_SWITCH) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/nx") include(NXFunctions) - set(${PROJECT}_AUDIOS "OAL") +endif() + +if(NOT COMMAND re3_platform_target) + function(re3_platform_target) + endfunction() +endif() + +if(WIN32) + set(${PROJECT}_AUDIOS "OAL" "MSS") else() set(${PROJECT}_AUDIOS "OAL") endif() -- cgit v1.2.3