mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 05:49:01 +08:00
8eb76645c0
* [pthreads4w] update for single config builds, improve downstream compatibility * [darknet] remove integrated pthreads cmake module * [pthreads4w] use config instead of module naming * fix library search path * improve downstream compatibility even more * fix references * do not store deprecated symbols in PThreads4W cmake config * fix references * [pthreads4w] add license * fix references * Update ports/pthreads/vcpkg.json Co-authored-by: Billy O'Neal <bion@microsoft.com> * add usage * update refs Co-authored-by: Billy O'Neal <bion@microsoft.com>
40 lines
2.0 KiB
CMake
40 lines
2.0 KiB
CMake
_find_package(PThreads4W)
|
|
set(PThreads_windows_INCLUDE_DIR "${PThreads4W_INCLUDE_DIR}")
|
|
set(PThreads_windows_LIBRARY "${PThreads4W_LIBRARY}")
|
|
set(PThreads_windows_LIBRARIES "${PThreads4W_LIBRARY}")
|
|
set(PThreads_windows_VERSION "${PThreads4W_VERSION}")
|
|
|
|
if(PThreads4W_FOUND)
|
|
set(PThreads_windows_FOUND TRUE)
|
|
|
|
if(NOT TARGET PThreads_windows::PThreads_windows)
|
|
if( EXISTS "${PThreads4W_LIBRARY_RELEASE_DLL}" )
|
|
add_library( PThreads_windows::PThreads_windows SHARED IMPORTED )
|
|
set_target_properties( PThreads_windows::PThreads_windows PROPERTIES
|
|
IMPORTED_LOCATION_RELEASE "${PThreads4W_LIBRARY_RELEASE_DLL}"
|
|
IMPORTED_IMPLIB "${PThreads4W_LIBRARY_RELEASE}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
|
IMPORTED_CONFIGURATIONS Release
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
|
|
if( EXISTS "${PThreads4W_LIBRARY_DEBUG_DLL}" )
|
|
set_property( TARGET PThreads_windows::PThreads_windows APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
|
set_target_properties( PThreads_windows::PThreads_windows PROPERTIES
|
|
IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG_DLL}"
|
|
IMPORTED_IMPLIB_DEBUG "${PThreads4W_LIBRARY_DEBUG}" )
|
|
endif()
|
|
else()
|
|
add_library( PThreads_windows::PThreads_windows UNKNOWN IMPORTED )
|
|
set_target_properties( PThreads_windows::PThreads_windows PROPERTIES
|
|
IMPORTED_LOCATION_RELEASE "${PThreads4W_LIBRARY_RELEASE}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
|
IMPORTED_CONFIGURATIONS Release
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
|
|
if( EXISTS "${PThreads4W_LIBRARY_DEBUG}" )
|
|
set_property( TARGET PThreads_windows::PThreads_windows APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
|
set_target_properties( PThreads_windows::PThreads_windows PROPERTIES
|
|
IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG}" )
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif()
|