From 5379525c2e241b2f4a6e972ea2de774caa40f3e2 Mon Sep 17 00:00:00 2001 From: staphen Date: Sat, 12 Jun 2021 17:54:08 -0400 Subject: [PATCH] Update CMake platform variable for NINTENDO_3DS --- CMake/ctr/Tools3DS.cmake | 2 +- CMake/ctr/modules/FindBZIP2.cmake | 2 +- CMake/ctr/modules/FindCITRO3D.cmake | 2 +- CMake/ctr/modules/FindFREETYPE.cmake | 2 +- CMake/ctr/modules/FindPNG.cmake | 2 +- CMake/ctr/modules/FindZLIB.cmake | 2 +- CMakeLists.txt | 12 ++++++------ 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMake/ctr/Tools3DS.cmake b/CMake/ctr/Tools3DS.cmake index dc775c75a..7ff66e52e 100644 --- a/CMake/ctr/Tools3DS.cmake +++ b/CMake/ctr/Tools3DS.cmake @@ -89,7 +89,7 @@ # ############################################################################ -if(NOT N3DS) +if(NOT NINTENDO_3DS) message(WARNING "Those tools can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.") endif() diff --git a/CMake/ctr/modules/FindBZIP2.cmake b/CMake/ctr/modules/FindBZIP2.cmake index 09204d7c9..458f2b30d 100644 --- a/CMake/ctr/modules/FindBZIP2.cmake +++ b/CMake/ctr/modules/FindBZIP2.cmake @@ -10,7 +10,7 @@ # target_link_libraries(mytarget ${BZIP2_LIBRARIES}) # target_include_directories(mytarget PRIVATE ${BZIP2_INCLUDE_DIRS}) -if(NOT N3DS) +if(NOT NINTENDO_3DS) message(FATAL_ERROR "This module can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.") endif() diff --git a/CMake/ctr/modules/FindCITRO3D.cmake b/CMake/ctr/modules/FindCITRO3D.cmake index 8fe616d42..d1679928a 100644 --- a/CMake/ctr/modules/FindCITRO3D.cmake +++ b/CMake/ctr/modules/FindCITRO3D.cmake @@ -10,7 +10,7 @@ # target_link_libraries(mytarget ${CITRO3D_LIBRARIES}) # target_include_directories(mytarget PRIVATE ${CITRO3D_INCLUDE_DIRS}) -if(NOT N3DS) +if(NOT NINTENDO_3DS) message(FATAL_ERROR "This module can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.") endif() diff --git a/CMake/ctr/modules/FindFREETYPE.cmake b/CMake/ctr/modules/FindFREETYPE.cmake index 15db4158d..cdb85f6f2 100644 --- a/CMake/ctr/modules/FindFREETYPE.cmake +++ b/CMake/ctr/modules/FindFREETYPE.cmake @@ -10,7 +10,7 @@ # target_link_libraries(mytarget ${FREETYPE_LIBRARIES}) # target_include_directories(mytarget PRIVATE ${FREETYPE_INCLUDE_DIRS}) -if(NOT N3DS) +if(NOT NINTENDO_3DS) message(FATAL_ERROR "This module can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.") endif() diff --git a/CMake/ctr/modules/FindPNG.cmake b/CMake/ctr/modules/FindPNG.cmake index 78aa87221..ef60ea360 100644 --- a/CMake/ctr/modules/FindPNG.cmake +++ b/CMake/ctr/modules/FindPNG.cmake @@ -10,7 +10,7 @@ # target_link_libraries(mytarget ${PNG_LIBRARIES}) # target_include_directories(mytarget PRIVATE ${PNG_INCLUDE_DIRS}) -if(NOT N3DS) +if(NOT NINTENDO_3DS) message(FATAL_ERROR "This module can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.") endif() diff --git a/CMake/ctr/modules/FindZLIB.cmake b/CMake/ctr/modules/FindZLIB.cmake index d848ba3ff..ae9d6c31e 100644 --- a/CMake/ctr/modules/FindZLIB.cmake +++ b/CMake/ctr/modules/FindZLIB.cmake @@ -9,7 +9,7 @@ # target_link_libraries(mytarget ${ZLIB_LIBRARY}) # target_include_directories(mytarget PRIVATE ${ZLIB_INCLUDE_DIRS}) -if(NOT N3DS) +if(NOT NINTENDO_3DS) message(FATAL_ERROR "This module can only be used if you are using the 3DS toolchain file. Please erase this build directory or create another one, and then use -DCMAKE_TOOLCHAIN_FILE=DevkitArm3DS.cmake when calling cmake for the 1st time. For more information, see the Readme.md for more information.") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e91daeb0..6196a2679 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ if(AMIGA) include(amiga_defs) endif() -if(N3DS) +if(NINTENDO_3DS) list(APPEND CMAKE_MODULE_PATH "${DevilutionX_SOURCE_DIR}/CMake/ctr") include(n3ds_defs) endif() @@ -206,7 +206,7 @@ if(NOT NOSOUND) endif() endif() -if(NOT N3DS) +if(NOT NINTENDO_3DS) find_package(Threads REQUIRED) endif() @@ -477,7 +477,7 @@ if(VITA) Source/platform/vita/keyboard.cpp) endif() -if(N3DS) +if(NINTENDO_3DS) list(APPEND libdevilutionx_SRCS Source/platform/ctr/system.cpp Source/platform/ctr/keyboard.cpp @@ -578,7 +578,7 @@ target_include_directories(libdevilutionx PUBLIC Source ${CMAKE_CURRENT_BINARY_DIR}) -if(NOT N3DS) +if(NOT NINTENDO_3DS) target_link_libraries(libdevilutionx PUBLIC Threads::Threads) endif() @@ -741,7 +741,7 @@ if (VITA) target_compile_definitions(libdevilutionx PUBLIC VITA) endif() -if(N3DS) +if(NINTENDO_3DS) target_link_libraries(libdevilutionx PUBLIC 3ds::freetype 3ds::bzip2 3ds::png) target_link_libraries(libdevilutionx PUBLIC 3ds::citro3d 3ds::ctrulib) endif() @@ -872,7 +872,7 @@ if(VITA) ) endif() -if(N3DS) +if(NINTENDO_3DS) set(APP_TITLE "DevilutionX") set(APP_DESCRIPTION "DevilutionX port for 3DS") set(APP_AUTHOR "Diasurgical Team")