diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a43de37..cbb45d1c 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 3cd14048..16665dec 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 d46ad12e..881ed086 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 dd21d9af..3a9c8f6e 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