git repos / PlatformFolders

commit 2e81279d

sum01 · 2018-06-21 15:13
2e81279d8d0804717906c870cd7525eaa2a93069 patch · browse files
parent 137981b4b29bc93313ad947f63c0fad94e5212a8

Only check for Windows once

Changed files

M CMakeLists.txt before
diff --git a/CMakeLists.txt b/CMakeLists.txt index b6315c2..af90733 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -58,6 +58,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(platform_folders PRIVATE "${_CoreServices_FRAMEWORK}")
endif()
+# Cmake's find_package search path is different based on the system
+# See https://cmake.org/cmake/help/latest/command/find_package.html for the list
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# You can pass these when calling Cmake, so don't override if the user does
if(NOT _WIN32_WINNT AND NOT WINVER)
@@ -66,12 +68,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
WINVER=0x0601
)
endif()
-endif()
-
-
-# Cmake's find_package search path is different based on the system
-# See https://cmake.org/cmake/help/latest/command/find_package.html for the list
-if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Controls where the exports, config, and configversion files install to
set(_PROJECT_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
else()