summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2018-09-05 13:06:11 -0700
committerSaleem Abdulrasool <abdulras@fb.com>2018-09-05 14:12:28 -0700
commitbec7ee2cbce1673eb2081ba18fb22b10df3cb598 (patch)
tree1081d1714e4dda92161e9ba98611d6381abffab8 /src/CMakeLists.txt
parenta9f67da092cfc81e7e82269666278a5463543c28 (diff)
build: only attempt to install MSVC system libraries on Windows
Newer versions of CMake attempt to query the system for information about the VS 2017 installation. Unfortunately, this query fails on non-Windows systems when cross-compiling: cmake_host_system_information does not recognize <key> VS_15_DIR CMake will not find these system libraries on non-Windows hosts anyways, and we were silencing the warnings, so simply omit the installation when cross-compiling to Windows.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 995a9df..468b0f0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -128,11 +128,13 @@ if (MSVC)
APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO)
endif(MSVC)
-set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+if(NOT MSVC OR CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ include(InstallRequiredSystemLibraries)
+endif()
set(libdir lib${LIB_SUFFIX})
-include (InstallRequiredSystemLibraries)
install(TARGETS ${PROGRAM} ${CMARK_INSTALL}
EXPORT cmark
RUNTIME DESTINATION bin