aboutsummaryrefslogtreecommitdiff
path: root/ports/pthreads
diff options
context:
space:
mode:
authorGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-04-12 02:30:59 -0700
committerGitHub <noreply@github.com>2019-04-12 02:30:59 -0700
commit0e000644053015b7f7a0985e14f0bd384c847d17 (patch)
tree7e456fd12b3bf281b28587338f1650017c8b32ab /ports/pthreads
parent93ce6b4f27602cd18f4327c2cfd84093d472b8bb (diff)
parent39ba5b2b30c9f7b49e777a62093cdd49d05b53a9 (diff)
downloadvcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.tar.gz
vcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.zip
Merge branch 'master' into master
Diffstat (limited to 'ports/pthreads')
-rw-r--r--ports/pthreads/CMakeLists.txt19
-rw-r--r--ports/pthreads/CONTROL2
-rw-r--r--ports/pthreads/portfile.cmake10
3 files changed, 18 insertions, 13 deletions
diff --git a/ports/pthreads/CMakeLists.txt b/ports/pthreads/CMakeLists.txt
index 70317b460..32f25e716 100644
--- a/ports/pthreads/CMakeLists.txt
+++ b/ports/pthreads/CMakeLists.txt
@@ -195,19 +195,22 @@ set(PTHREADS_COMPATIBILITY_VERSION 2)
set(CMAKE_DEBUG_POSTFIX d)
set(PTHREADS_COMPILER V)
-set(PTHREADS_LIBRARY "pthreads${PTHREADS_COMPILER}${PTHREADS_EXCEPTION_SCHEME}${PTHREADS_COMPATIBILITY_VERSION}")
+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()
diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL
index 53b710f2a..d22280d90 100644
--- a/ports/pthreads/CONTROL
+++ b/ports/pthreads/CONTROL
@@ -1,3 +1,3 @@
Source: pthreads
-Version: 2.9.1-3
+Version: 2.9.1-5
Description: pthreads for windows
diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake
index 3fb715aec..43489adb6 100644
--- a/ports/pthreads/portfile.cmake
+++ b/ports/pthreads/portfile.cmake
@@ -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")
@@ -41,12 +43,12 @@ endforeach()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright)
file(INSTALL
- ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib
+ ${CURRENT_PACKAGES_DIR}/lib/pthreadVC2.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link
- RENAME pthreads.lib
+ RENAME pthread.lib
)
file(INSTALL
- ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadsVC2d.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVC2d.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link
- RENAME pthreads.lib
+ RENAME pthread.lib
)