Skip to content

Commit f83b5a4

Browse files
authored
Merge pull request #351 from compnerd/windows-linker-search-paths
build: add the default search paths for Windows
2 parents f6e6917 + 1b6722a commit f83b5a4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
328328
dispatch_windows_arch_spelling(${CMAKE_SYSTEM_PROCESSOR} DISPATCH_MSVC_ARCH)
329329
dispatch_windows_include_for_arch(${DISPATCH_MSVC_ARCH} DISPATCH_INCLUDES)
330330
include_directories(BEFORE SYSTEM ${DISPATCH_INCLUDES})
331+
dispatch_windows_lib_for_arch(${CMAKE_SYSTEM_PROCESSOR} DISPATCH_LIBDIR)
332+
link_directories(${DISPATCH_LIBDIR})
331333
endif()
332334

333335
add_subdirectory(dispatch)

src/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ target_link_libraries(dispatch PRIVATE Threads::Threads)
196196
if(WITH_BLOCKS_RUNTIME)
197197
target_link_libraries(dispatch PRIVATE BlocksRuntime)
198198
endif()
199+
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
200+
target_link_libraries(dispatch
201+
PRIVATE
202+
WS2_32
203+
WinMM
204+
synchronization)
205+
endif()
199206
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
200207
set_property(TARGET dispatch
201208
APPEND_STRING

0 commit comments

Comments
 (0)