From 78e532215aa29feb29ac6321032072cf61bf0e50 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 6 Aug 2022 23:50:47 -0600 Subject: [PATCH] Simplify how lists are expanded --- CMakeLists.txt | 2 +- src/SFML/Main/CMakeLists.txt | 6 +++--- src/SFML/Network/CMakeLists.txt | 6 ++---- src/SFML/System/CMakeLists.txt | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a43de378..cbb45d1c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ if(SFML_OS_ANDROID) endif() # avoid missing libraries when building SFML for Android with NDK r19c and later - set(CMAKE_FIND_ROOT_PATH "${PROJECT_SOURCE_DIR};${CMAKE_FIND_ROOT_PATH}") + list(PREPEND CMAKE_FIND_ROOT_PATH "${PROJECT_SOURCE_DIR}") # make sure there's the android library available if (CMAKE_ANDROID_API LESS 26) diff --git a/src/SFML/Main/CMakeLists.txt b/src/SFML/Main/CMakeLists.txt index 3cd140489..16665dec7 100644 --- a/src/SFML/Main/CMakeLists.txt +++ b/src/SFML/Main/CMakeLists.txt @@ -4,12 +4,12 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Main) # sources if(SFML_OS_WINDOWS) - set(SRC ${SRC} ${SRCROOT}/MainWin32.cpp) + set(SRC ${SRCROOT}/MainWin32.cpp) elseif(SFML_OS_IOS) enable_language(OBJCXX) - set(SRC ${SRC} ${SRCROOT}/MainiOS.mm) + set(SRC ${SRCROOT}/MainiOS.mm) elseif(SFML_OS_ANDROID) - set(SRC ${SRC} ${SRCROOT}/MainAndroid.cpp) + set(SRC ${SRCROOT}/MainAndroid.cpp) else() return() endif() diff --git a/src/SFML/Network/CMakeLists.txt b/src/SFML/Network/CMakeLists.txt index d46ad12eb..881ed0860 100644 --- a/src/SFML/Network/CMakeLists.txt +++ b/src/SFML/Network/CMakeLists.txt @@ -29,14 +29,12 @@ set(SRC # add platform specific sources if(SFML_OS_WINDOWS) - set(SRC - ${SRC} + list(APPEND SRC ${SRCROOT}/Win32/SocketImpl.cpp ${SRCROOT}/Win32/SocketImpl.hpp ) else() - set(SRC - ${SRC} + list(APPEND SRC ${SRCROOT}/Unix/SocketImpl.cpp ${SRCROOT}/Unix/SocketImpl.hpp ) diff --git a/src/SFML/System/CMakeLists.txt b/src/SFML/System/CMakeLists.txt index dd21d9af1..3a9c8f6e4 100644 --- a/src/SFML/System/CMakeLists.txt +++ b/src/SFML/System/CMakeLists.txt @@ -50,7 +50,7 @@ else() ) if(SFML_OS_ANDROID) - set(PLATFORM_SRC ${PLATFORM_SRC} + list(APPEND PLATFORM_SRC ${SRCROOT}/Android/Activity.hpp ${SRCROOT}/Android/Activity.cpp ${SRCROOT}/Android/NativeActivity.cpp