"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "c39a511b5ff7d37e594aad22b8ac85d0fef20406"
Unverified Commit 8928f477 authored by APTX's avatar APTX Committed by GitHub
Browse files

Find Threads target if necessary (#2522) (#2526)

parent 0f1b2b37
...@@ -19,6 +19,16 @@ if(NOT TARGET dlib-shared AND NOT dlib_BINARY_DIR) ...@@ -19,6 +19,16 @@ if(NOT TARGET dlib-shared AND NOT dlib_BINARY_DIR)
# Compute paths # Compute paths
get_filename_component(dlib_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(dlib_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${dlib_CMAKE_DIR}/dlib.cmake") include("${dlib_CMAKE_DIR}/dlib.cmake")
# Check if Threads::Threads target is required and find it if necessary
get_target_property(dlib_deps_threads_check dlib::dlib INTERFACE_LINK_LIBRARIES)
list(FIND dlib_deps_threads_check "Threads::Threads" dlib_deps_threads_idx)
if (${dlib_deps_threads_idx} GREATER -1)
if (NOT TARGET Threads)
find_package(Threads REQUIRED)
endif()
endif()
unset(dlib_deps_threads_idx)
unset(dlib_deps_threads_check)
endif() endif()
set(dlib_LIBRARIES dlib::dlib) set(dlib_LIBRARIES dlib::dlib)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment