aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2019-07-10 08:16:29 +0200
committerPhil Christensen <philc@microsoft.com>2019-07-09 23:16:29 -0700
commitbb417d3beb579993a93c912b511dc9d336997b0d (patch)
treebfaf03b88223b3b175bf40e24c674ef774fdf45c
parent9b861040d6922ba1b38ec53b240938213c1ce911 (diff)
downloadvcpkg-bb417d3beb579993a93c912b511dc9d336997b0d.tar.gz
vcpkg-bb417d3beb579993a93c912b511dc9d336997b0d.zip
[pthreads4W] vcpkg wrapper fixes (#7178)
* [pthreads4W] restore compatibility with projects using pthreads v2, set proper VERSION symbol * [pthreads4W] remove FORCED cached variables, to enable user override
-rw-r--r--ports/pthreads/CONTROL2
-rw-r--r--ports/pthreads/vcpkg-cmake-wrapper.cmake27
2 files changed, 16 insertions, 13 deletions
diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL
index e1b96a438..53d5706c7 100644
--- a/ports/pthreads/CONTROL
+++ b/ports/pthreads/CONTROL
@@ -1,4 +1,4 @@
Source: pthreads
-Version: 3.0.0-1
+Version: 3.0.0-2
Homepage: https://sourceware.org/pub/pthreads-win32/
Description: pthreads for windows
diff --git a/ports/pthreads/vcpkg-cmake-wrapper.cmake b/ports/pthreads/vcpkg-cmake-wrapper.cmake
index ec5c473fb..8d3a4e875 100644
--- a/ports/pthreads/vcpkg-cmake-wrapper.cmake
+++ b/ports/pthreads/vcpkg-cmake-wrapper.cmake
@@ -52,7 +52,7 @@ endif()
set(PThreads4W_MAJOR_VERSION 3)
set(PThreads4W_MINOR_VERSION 0)
set(PThreads4W_PATCH_VERSION 0)
-set(PThreads_VERSION "${PThreads4W_MAJOR_VERSION}.${PThreads4W_MINOR_VERSION}.${PThreads4W_PATCH_VERSION}")
+set(PThreads4W_VERSION "${PThreads4W_MAJOR_VERSION}.${PThreads4W_MINOR_VERSION}.${PThreads4W_PATCH_VERSION}")
# Allow libraries to be set manually
if(NOT PThreads4W_LIBRARY)
@@ -83,17 +83,20 @@ find_package_handle_standard_args(PThreads4W DEFAULT_MSG PThreads4W_LIBRARY PThr
mark_as_advanced(PThreads4W_INCLUDE_DIR PThreads4W_LIBRARY PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY)
#Compatibility definitions, deprecated
-set(PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "" FORCE)
-set(PTHREADS_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "" FORCE)
-set(PThreads_windows_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "" FORCE)
-set(PTHREAD_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-set(PTHREADS_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-set(PTHREAD_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-set(PTHREADS_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-set(LIBPTHREAD ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-set(LIBPTHREADS ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-set(PThreads_windows_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "" FORCE)
-
+set(PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "")
+set(PTHREADS_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "")
+set(PThreads_windows_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "")
+set(PTHREAD_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "")
+set(PTHREADS_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "")
+set(PTHREAD_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "")
+set(PTHREADS_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "")
+set(LIBPTHREAD ${PThreads4W_LIBRARY} CACHE STRING "")
+set(LIBPTHREADS ${PThreads4W_LIBRARY} CACHE STRING "")
+set(PThreads_windows_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "")
+set(PThreads_VERSION "${PThreads4W_VERSION}")
+if(PThreads4W_FOUND)
+ set(PThreads_windows_FOUND TRUE)
+endif()
#TARGETS
if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W_CXXEXC )