aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2019-06-27 00:00:48 +0200
committerCurtis J Bezault <curtbezault@gmail.com>2019-06-26 15:00:48 -0700
commitfd87a081bb6acc33ec4e581f1ce60edcad80eda1 (patch)
tree96b9a4c370fe1e75d70e54d6ef3143c912ad2e24 /scripts/cmake
parent8c22bd9aadc510623cd082f1d9ad59b862be9f22 (diff)
downloadvcpkg-fd87a081bb6acc33ec4e581f1ce60edcad80eda1.tar.gz
vcpkg-fd87a081bb6acc33ec4e581f1ce60edcad80eda1.zip
Introduce an easier way to identify target systems... (#6846)
* Introduce an easier way to identify target systems... * fix missing () * move the include around. also added vcpkg_common_functions to be automatically included * remove warning message * added remaining VCPKG_CMAKE_SYSTEM_NAMEs found only in vcpkg_configure_cmake to load a toolchain. * remove warning again from messed up merge
Diffstat (limited to 'scripts/cmake')
-rw-r--r--scripts/cmake/vcpkg_common_definitions.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_common_definitions.cmake b/scripts/cmake/vcpkg_common_definitions.cmake
new file mode 100644
index 000000000..8dc05de3c
--- /dev/null
+++ b/scripts/cmake/vcpkg_common_definitions.cmake
@@ -0,0 +1,14 @@
+if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(VCPKG_TARGET_IS_WINDOWS 1)
+ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(VCPKG_TARGET_IS_UWP 1)
+ endif()
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(VCPKG_TARGET_IS_OSX 1)
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(VCPKG_TARGET_IS_LINUX 1)
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android")
+ set(VCPKG_TARGET_IS_ANDROID 1)
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ set(VCPKG_TARGET_IS_FREEBSD 1)
+endif()