mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[pthreads] Add CMake config to support find_package(pthreads) (#4081)
* [pthreads] Add CMake config to support find_package(pthreads) * [pthreads] Support find_package(pthreads)
This commit is contained in:
parent
9b4bf67701
commit
88f6875e0f
@ -197,17 +197,20 @@ set(PTHREADS_COMPILER V)
|
||||
|
||||
set(PTHREADS_LIBRARY "pthread${PTHREADS_COMPILER}${PTHREADS_EXCEPTION_SCHEME}${PTHREADS_COMPATIBILITY_VERSION}")
|
||||
|
||||
include_directories(.)
|
||||
|
||||
add_library(${PTHREADS_LIBRARY} ${PTHREAD_SOURCES})
|
||||
add_library(pthreads ${PTHREAD_SOURCES})
|
||||
target_include_directories(pthreads PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_target_properties(pthreads PROPERTIES OUTPUT_NAME ${PTHREADS_LIBRARY})
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
set_property(TARGET pthreads PROPERTY PUBLIC_HEADER ${PTHREAD_PUBLIC_HEADERS})
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS ${PTHREADS_LIBRARY}
|
||||
TARGETS pthreads EXPORT pthreads-config
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
install(EXPORT pthreads-config DESTINATION share/pthreads)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES ${PTHREAD_PUBLIC_HEADERS} DESTINATION include)
|
||||
endif()
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: pthreads
|
||||
Version: 2.9.1-4
|
||||
Version: 2.9.1-5
|
||||
Description: pthreads for windows
|
||||
|
@ -26,6 +26,8 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/*.h")
|
||||
|
Loading…
x
Reference in New Issue
Block a user