diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 622937b2a..df269befd 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -72,6 +72,9 @@ else() if(HAVE_ALLOCA_H) target_compile_definitions(loader_specific_options INTERFACE HAVE_ALLOCA_H) endif() + + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) endif() set(NORMAL_LOADER_SRCS @@ -381,9 +384,6 @@ else() VERSION "${VULKAN_LOADER_VERSION}" ) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - target_link_libraries(vulkan PRIVATE ${CMAKE_DL_LIBS} m Threads::Threads) set_target_properties(vulkan PROPERTIES OUTPUT_NAME ${API_TYPE})