Skip to content

Commit 102d254

Browse files
authored
Merge pull request commonmark#265 from compnerd/upstream-windows-cross-compile
build: only attempt to install MSVC system libraries on Windows
2 parents a9f67da + bec7ee2 commit 102d254

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ if (MSVC)
128128
APPEND PROPERTY LINK_FLAGS /INCREMENTAL:NO)
129129
endif(MSVC)
130130

131-
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
131+
if(NOT MSVC OR CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
132+
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
133+
include(InstallRequiredSystemLibraries)
134+
endif()
132135

133136
set(libdir lib${LIB_SUFFIX})
134137

135-
include (InstallRequiredSystemLibraries)
136138
install(TARGETS ${PROGRAM} ${CMARK_INSTALL}
137139
EXPORT cmark
138140
RUNTIME DESTINATION bin

0 commit comments

Comments
 (0)