From 6cb42ceb1016a6f4aa9602218c04b10cf24abd42 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 13 Aug 2022 16:53:42 +0200 Subject: [PATCH] Make Threads stub avalible to other platforms --- CMake/platforms/ctr/modules/FindThreads.cmake | 3 --- CMake/platforms/n3ds.cmake | 1 + CMake/platforms/threads-stub/FindThreads.cmake | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 CMake/platforms/ctr/modules/FindThreads.cmake create mode 100644 CMake/platforms/threads-stub/FindThreads.cmake diff --git a/CMake/platforms/ctr/modules/FindThreads.cmake b/CMake/platforms/ctr/modules/FindThreads.cmake deleted file mode 100644 index 620dd75bf..000000000 --- a/CMake/platforms/ctr/modules/FindThreads.cmake +++ /dev/null @@ -1,3 +0,0 @@ -# Stub out the Threads package on the 3DS. -# 3DS does not have a system threads library but SDL threads are supported. -add_library(Threads::Threads INTERFACE IMPORTED GLOBAL) diff --git a/CMake/platforms/n3ds.cmake b/CMake/platforms/n3ds.cmake index 77dac0319..bab7c0447 100644 --- a/CMake/platforms/n3ds.cmake +++ b/CMake/platforms/n3ds.cmake @@ -15,6 +15,7 @@ set(NOEXIT ON) # 3DS libraries and compile definitions list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/ctr") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/ctr/modules") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/threads-stub") find_package(CITRO3D REQUIRED) list(APPEND DEVILUTIONX_PLATFORM_SUBDIRECTORIES platform/ctr) diff --git a/CMake/platforms/threads-stub/FindThreads.cmake b/CMake/platforms/threads-stub/FindThreads.cmake new file mode 100644 index 000000000..744edc7c3 --- /dev/null +++ b/CMake/platforms/threads-stub/FindThreads.cmake @@ -0,0 +1,3 @@ +# Stub out the Threads package. +# Some platforms do not have a system threads library but SDL threads are supported. +add_library(Threads::Threads INTERFACE IMPORTED GLOBAL)