mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +08:00
[opencl] fixed linkage when libOpenCL is static (#31637)
* [opencl]: replaced hardcoded BUILD_SHARED_LIBS (user context) with VCPKG_LIBRARY_LINKAGE (library build context) * Updated version registries
This commit is contained in:
parent
e05695d03f
commit
bf1d50ff7a
@ -80,4 +80,4 @@ vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY)
|
||||
|
@ -1,12 +1,12 @@
|
||||
_find_package(${ARGS})
|
||||
if(NOT BUILD_SHARED_LIBS AND (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin"))
|
||||
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin"))
|
||||
find_package(Threads REQUIRED)
|
||||
set(OpenCL_Extra_Libs ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
list(APPEND OpenCL_Extra_Libs cfgmgr32)
|
||||
if($ENV{WindowsSDKVersion} MATCHES "^10")
|
||||
list(APPEND OpenCL_Extra_Libs OneCoreUAP)
|
||||
endif()
|
||||
if($ENV{WindowsSDKVersion} MATCHES "^10")
|
||||
list(APPEND OpenCL_Extra_Libs OneCoreUAP)
|
||||
endif()
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
|
||||
if(TARGET OpenCL::OpenCL)
|
||||
@ -15,4 +15,5 @@ if(NOT BUILD_SHARED_LIBS AND (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin"))
|
||||
if(OpenCL_LIBRARIES)
|
||||
list(APPEND OpenCL_LIBRARIES ${OpenCL_Extra_Libs})
|
||||
endif()
|
||||
endif()
|
||||
unset(OpenCL_Extra_Libs)
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "opencl",
|
||||
"version-string": "v2023.02.06",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "C/C++ headers and ICD loader (Installable Client Driver) for OpenCL",
|
||||
"homepage": "https://github.com/KhronosGroup/OpenCL-Headers",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -5878,7 +5878,7 @@
|
||||
},
|
||||
"opencl": {
|
||||
"baseline": "v2023.02.06",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"opencolorio": {
|
||||
"baseline": "2.1.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c55e82e4ec70906ec28b692d2625584025de4725",
|
||||
"version-string": "v2023.02.06",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "d206a1716a411eb9862c98d65ab3552def0c6492",
|
||||
"version-string": "v2023.02.06",
|
||||
|
Loading…
x
Reference in New Issue
Block a user