early-access version 2853
This commit is contained in:
13
externals/vcpkg/ports/pthreads/fix-arm-macro.patch
vendored
Executable file
13
externals/vcpkg/ports/pthreads/fix-arm-macro.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/context.h b/context.h
|
||||
index 33294c1..318b689 100644
|
||||
--- a/context.h
|
||||
+++ b/context.h
|
||||
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64)
|
||||
-#define PTW32_PROGCTR(Context) ((Context).Pc)
|
||||
+#define __PTW32_PROGCTR(Context) ((Context).Pc)
|
||||
#endif
|
||||
|
||||
#if !defined (__PTW32_PROGCTR)
|
||||
17
externals/vcpkg/ports/pthreads/fix-uwp-linkage.patch
vendored
Executable file
17
externals/vcpkg/ports/pthreads/fix-uwp-linkage.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/implement.h b/implement.h
|
||||
index 1579376..3a7d29b 100644
|
||||
--- a/implement.h
|
||||
+++ b/implement.h
|
||||
@@ -36,6 +36,12 @@
|
||||
#if !defined(_IMPLEMENT_H)
|
||||
#define _IMPLEMENT_H
|
||||
|
||||
+#if 1 // The condition should be `defined(__cplusplus_winrt)` when compile option is provided correctly.
|
||||
+// porvide 2 static libs to resolve link error. 'kernel32' and 'windowsapp'
|
||||
+#pragma comment(lib, "kernel32")
|
||||
+#pragma comment(lib, "WindowsApp")
|
||||
+#endif
|
||||
+
|
||||
#if !defined (__PTW32_CONFIG_H)
|
||||
# error "config.h was not #included"
|
||||
#endif
|
||||
108
externals/vcpkg/ports/pthreads/portfile.cmake
vendored
Executable file
108
externals/vcpkg/ports/pthreads/portfile.cmake
vendored
Executable file
@@ -0,0 +1,108 @@
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(PTHREADS4W_VERSION "3.0.0")
|
||||
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
list(APPEND PATCH_FILES fix-uwp-linkage.patch)
|
||||
# Inject linker option using the `LINK` environment variable
|
||||
# https://docs.microsoft.com/en-us/cpp/build/reference/linker-options
|
||||
# https://docs.microsoft.com/en-us/cpp/build/reference/linking#link-environment-variables
|
||||
set(ENV{LINK} "/APPCONTAINER")
|
||||
endif()
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND PATCH_FILES use-md.patch)
|
||||
else()
|
||||
list(APPEND PATCH_FILES use-mt.patch)
|
||||
endif()
|
||||
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO pthreads4w
|
||||
FILENAME "pthreads4w-code-v${PTHREADS4W_VERSION}.zip"
|
||||
SHA512 49e541b66c26ddaf812edb07b61d0553e2a5816ab002edc53a38a897db8ada6d0a096c98a9af73a8f40c94283df53094f76b429b09ac49862465d8697ed20013
|
||||
PATCHES
|
||||
fix-arm-macro.patch
|
||||
${PATCH_FILES}
|
||||
)
|
||||
|
||||
find_program(NMAKE nmake REQUIRED)
|
||||
|
||||
################
|
||||
# Release build
|
||||
################
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f Makefile all install
|
||||
"DESTROOT=\"${INST_DIR_REL}\""
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME nmake-build-${TARGET_TRIPLET}-release
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
################
|
||||
# Debug build
|
||||
################
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} /G -f Makefile all install
|
||||
"DESTROOT=\"${INST_DIR_DBG}\""
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pthreadVC3d.dll")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pthreadVCE3d.dll")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pthreadVSE3d.dll")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/pthreadVC3.dll")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/pthreadVCE3.dll")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/pthreadVSE3.dll")
|
||||
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVC3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVCE3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVSE3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVC3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVCE3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVSE3.lib")
|
||||
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pthreadVC3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pthreadVCE3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pthreadVSE3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVC3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVCE3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVSE3.lib")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVC3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVCE3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVSE3.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVC3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVCE3d.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVSE3d.lib")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpthreadVC3.lib ${CURRENT_PACKAGES_DIR}/lib/pthreadVC3.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpthreadVCE3.lib ${CURRENT_PACKAGES_DIR}/lib/pthreadVCE3.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpthreadVSE3.lib ${CURRENT_PACKAGES_DIR}/lib/pthreadVSE3.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVC3d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVC3d.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVCE3d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVCE3d.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVSE3d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVSE3d.lib)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthread)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads_windows)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled)
|
||||
9
externals/vcpkg/ports/pthreads/usage
vendored
Executable file
9
externals/vcpkg/ports/pthreads/usage
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
The package pthreads provides CMake targets:
|
||||
|
||||
find_package(pthreads REQUIRED)
|
||||
|
||||
target_link_libraries(main PRIVATE PThreads4W::PThreads4W)
|
||||
#or
|
||||
target_link_libraries(main PRIVATE PThreads4W::PThreads4W_CXXEXC)
|
||||
#or
|
||||
target_link_libraries(main PRIVATE PThreads4W::PThreads4W_STRUCTEXC)
|
||||
33
externals/vcpkg/ports/pthreads/use-md.patch
vendored
Executable file
33
externals/vcpkg/ports/pthreads/use-md.patch
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index a703b9c..ff81e7c 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -173,22 +173,22 @@ VC-debug:
|
||||
# @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).small_static_stamp
|
||||
|
||||
VCE-static:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).inlined_static_stamp
|
||||
|
||||
VCE-static-debug:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
|
||||
VSE-static:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).inlined_static_stamp
|
||||
|
||||
VSE-static-debug:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
|
||||
VC-static:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
|
||||
|
||||
VC-static-debug:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
|
||||
|
||||
realclean: clean
|
||||
33
externals/vcpkg/ports/pthreads/use-mt.patch
vendored
Executable file
33
externals/vcpkg/ports/pthreads/use-mt.patch
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index a703b9c..502275f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -134,22 +134,22 @@ all-tests-mt:
|
||||
@ echo $@ completed successfully.
|
||||
|
||||
VCE:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER).dll
|
||||
|
||||
VCE-debug:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_CXX pthreadVCE$(PTW32_VER_DEBUG).dll
|
||||
|
||||
VSE:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VSEFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER).dll
|
||||
|
||||
VSE-debug:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).dll
|
||||
|
||||
VC:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).dll
|
||||
|
||||
VC-debug:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MDd" EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).dll
|
||||
|
||||
#
|
||||
# Static builds
|
||||
227
externals/vcpkg/ports/pthreads/vcpkg-cmake-wrapper.cmake
vendored
Executable file
227
externals/vcpkg/ports/pthreads/vcpkg-cmake-wrapper.cmake
vendored
Executable file
@@ -0,0 +1,227 @@
|
||||
#.rst:
|
||||
# PThreads4W config wrap for vcpkg
|
||||
# ------------
|
||||
#
|
||||
# Find the PThread4W includes and library.
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This script defines the following variables:
|
||||
#
|
||||
# ``PThreads4W_FOUND``
|
||||
# True if PThreads4W library found
|
||||
#
|
||||
# ``PThreads4W_VERSION``
|
||||
# Containing the PThreads4W version tag (manually defined)
|
||||
#
|
||||
# ``PThreads4W_INCLUDE_DIR``
|
||||
# Location of PThreads4W headers
|
||||
#
|
||||
# ``PThreads4W_LIBRARY``
|
||||
# List of libraries to link with when using PThreads4W (no exception handling)
|
||||
#
|
||||
# ``PThreads4W_CXXEXC_LIBRARY``
|
||||
# List of libraries to link with when using PThreads4W (C++ exception handling)
|
||||
#
|
||||
# ``PThreads4W_STRUCTEXC_LIBRARY``
|
||||
# List of libraries to link with when using PThreads4W (struct exception handling)
|
||||
#
|
||||
# Result Targets
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This script defines the following targets:
|
||||
#
|
||||
# ``PThreads4W::PThreads4W``
|
||||
# Target to use PThreads4W (no exception handling)
|
||||
#
|
||||
# ``PThreads4W::PThreads4W_CXXEXC``
|
||||
# Target to use PThreads4W (C++ exception handling)
|
||||
#
|
||||
# ``PThreads4W::PThreads4W_STRUCTEXC``
|
||||
# Target to use PThreads4W (struct exception handling)
|
||||
#
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
|
||||
if(NOT PThreads4W_INCLUDE_DIR)
|
||||
find_path(PThreads4W_INCLUDE_DIR NAMES pthread.h)
|
||||
endif()
|
||||
|
||||
set(PThreads4W_MAJOR_VERSION 3)
|
||||
set(PThreads4W_MINOR_VERSION 0)
|
||||
set(PThreads4W_PATCH_VERSION 0)
|
||||
set(PThreads4W_VERSION "${PThreads4W_MAJOR_VERSION}.${PThreads4W_MINOR_VERSION}.${PThreads4W_PATCH_VERSION}")
|
||||
|
||||
# Allow libraries to be set manually
|
||||
if(NOT PThreads4W_LIBRARY)
|
||||
find_library(PThreads4W_LIBRARY_RELEASE NAMES pthreadVC${PThreads4W_MAJOR_VERSION})
|
||||
find_library(PThreads4W_LIBRARY_DEBUG NAMES pthreadVC${PThreads4W_MAJOR_VERSION}d)
|
||||
select_library_configurations(PThreads4W)
|
||||
endif()
|
||||
if(NOT PThreads4W_CXXEXC_LIBRARY)
|
||||
find_library(PThreads4W_CXXEXC_LIBRARY_RELEASE NAMES pthreadVCE${PThreads4W_MAJOR_VERSION})
|
||||
find_library(PThreads4W_CXXEXC_LIBRARY_DEBUG NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}d)
|
||||
select_library_configurations(PThreads4W_CXXEXC)
|
||||
endif()
|
||||
if(NOT PThreads4W_STRUCTEXC_LIBRARY)
|
||||
find_library(PThreads4W_STRUCTEXC_LIBRARY_RELEASE NAMES pthreadVSE${PThreads4W_MAJOR_VERSION})
|
||||
find_library(PThreads4W_STRUCTEXC_LIBRARY_DEBUG NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}d)
|
||||
select_library_configurations(PThreads4W_STRUCTEXC)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(PThreads4W DEFAULT_MSG PThreads4W_LIBRARY PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY PThreads4W_INCLUDE_DIR)
|
||||
mark_as_advanced(PThreads4W_INCLUDE_DIR PThreads4W_LIBRARY PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY)
|
||||
|
||||
set(PThreads4W_DLL_DIR ${PThreads4W_INCLUDE_DIR})
|
||||
list(TRANSFORM PThreads4W_DLL_DIR APPEND "/../bin")
|
||||
message(STATUS "PThreads4W_DLL_DIR: ${PThreads4W_DLL_DIR}")
|
||||
set(PThreads4W_DEBUG_DLL_DIR ${PThreads4W_INCLUDE_DIR})
|
||||
list(TRANSFORM PThreads4W_DEBUG_DLL_DIR APPEND "/../debug/bin")
|
||||
message(STATUS "PThreads4W_DEBUG_DLL_DIR: ${PThreads4W_DEBUG_DLL_DIR}")
|
||||
|
||||
find_file(PThreads4W_LIBRARY_RELEASE_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR})
|
||||
find_file(PThreads4W_LIBRARY_DEBUG_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DEBUG_DLL_DIR})
|
||||
find_file(PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR})
|
||||
find_file(PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DEBUG_DLL_DIR})
|
||||
find_file(PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR})
|
||||
find_file(PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DEBUG_DLL_DIR})
|
||||
|
||||
#Compatibility definitions, deprecated
|
||||
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 )
|
||||
if( EXISTS "${PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL}" )
|
||||
add_library( PThreads4W::PThreads4W_CXXEXC SHARED IMPORTED )
|
||||
set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL}"
|
||||
IMPORTED_IMPLIB "${PThreads4W_CXXEXC_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
|
||||
if( EXISTS "${PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL}" )
|
||||
set_property( TARGET PThreads4W::PThreads4W_CXXEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
||||
set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL}"
|
||||
IMPORTED_IMPLIB_DEBUG "${PThreads4W_CXXEXC_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
else()
|
||||
add_library( PThreads4W::PThreads4W_CXXEXC UNKNOWN IMPORTED )
|
||||
set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${PThreads4W_CXXEXC_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
|
||||
if( EXISTS "${PThreads4W_CXXEXC_LIBRARY_DEBUG}" )
|
||||
set_property( TARGET PThreads4W::PThreads4W_CXXEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
||||
set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${PThreads4W_CXXEXC_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W_STRUCTEXC )
|
||||
if( EXISTS "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL}" )
|
||||
add_library( PThreads4W::PThreads4W_STRUCTEXC SHARED IMPORTED )
|
||||
set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL}"
|
||||
IMPORTED_IMPLIB "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
|
||||
if( EXISTS "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL}" )
|
||||
set_property( TARGET PThreads4W::PThreads4W_STRUCTEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
||||
set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL}"
|
||||
IMPORTED_IMPLIB_DEBUG "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
else()
|
||||
add_library( PThreads4W::PThreads4W_STRUCTEXC UNKNOWN IMPORTED )
|
||||
set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}"
|
||||
IMPORTED_CONFIGURATIONS Release
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
|
||||
if( EXISTS "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG}" )
|
||||
set_property( TARGET PThreads4W::PThreads4W_STRUCTEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
||||
set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W )
|
||||
if( EXISTS "${PThreads4W_LIBRARY_RELEASE_DLL}" )
|
||||
add_library( PThreads4W::PThreads4W SHARED IMPORTED )
|
||||
set_target_properties( PThreads4W::PThreads4W 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 PThreads4W::PThreads4W APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
||||
set_target_properties( PThreads4W::PThreads4W PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG_DLL}"
|
||||
IMPORTED_IMPLIB_DEBUG "${PThreads4W_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
else()
|
||||
add_library( PThreads4W::PThreads4W UNKNOWN IMPORTED )
|
||||
set_target_properties( PThreads4W::PThreads4W 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 PThreads4W::PThreads4W APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
|
||||
set_target_properties( PThreads4W::PThreads4W PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#Compatibility targets, deprecated
|
||||
if( PThreads4W_FOUND AND 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()
|
||||
7
externals/vcpkg/ports/pthreads/vcpkg.json
vendored
Executable file
7
externals/vcpkg/ports/pthreads/vcpkg.json
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "pthreads",
|
||||
"version": "3.0.0",
|
||||
"port-version": 10,
|
||||
"description": "pthreads for windows",
|
||||
"homepage": "https://sourceware.org/pub/pthreads-win32/"
|
||||
}
|
||||
Reference in New Issue
Block a user