Skip to content

Commit ea2a03d

Browse files
committed
build: install libraries into the right location
Windows splits the installation into the library directory (for the import library) and the runtime component (dll) which is installed into bin. This makes the Windows build happier.
1 parent 290df63 commit ea2a03d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
166166
endif()
167167
install(TARGETS
168168
BlocksRuntime
169-
DESTINATION
170-
${INSTALL_TARGET_DIR})
169+
ARCHIVE DESTINATION ${INSTALL_TARGET_DIR}
170+
LIBRARY DESTINATION ${INSTALL_TARGET_DIR}
171+
RUNTIME DESTINATION bin)
171172
endif()
172173

173174
check_symbol_exists(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)

src/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,10 @@ dispatch_set_linker(dispatch)
249249

250250
install(TARGETS
251251
dispatch
252-
DESTINATION
253-
"${INSTALL_TARGET_DIR}")
252+
ARCHIVE DESTINATION ${INSTALL_TARGET_DIR}
253+
LIBRARY DESTINATION ${INSTALL_TARGET_DIR}
254+
RUNTIME DESTINATION bin)
255+
254256
if(ENABLE_SWIFT)
255257
install(FILES
256258
${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftmodule

0 commit comments

Comments
 (0)