2018-03-02 00:08:53 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenCL-Headers
|
2022-12-14 11:07:50 +08:00
|
|
|
REF a51354a85f41d203e755124ad51ae3425933df45
|
|
|
|
SHA512 007f852c10f486c67696a278766790102369306aea2aa0f9b238ef167868c76771e4f6a11abb01bb3614defea501f295a97684a48531865a68299e69704bedca
|
2018-03-02 00:08:53 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2020-11-14 05:41:47 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/CL" DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
2018-03-02 00:08:53 +08:00
|
|
|
|
|
|
|
# OpenCL C++ headers
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenCL-CLHPP
|
2022-12-14 11:07:50 +08:00
|
|
|
REF 4a1157466afe72a87e8abc59537ef577534ccadf
|
|
|
|
SHA512 8b2f6dfecba649f3eca1c6b7ef825602215bf911fb08cc0745d0d3bb627d6edd9e95cf2355ba55718686d3604421ec632c2c3381040f73861bd0218fcfc60c57
|
2018-03-02 00:08:53 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2022-12-14 11:07:50 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/include/CL" DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
2018-03-02 00:08:53 +08:00
|
|
|
|
|
|
|
# OpenCL ICD loader
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenCL-ICD-Loader
|
2022-12-14 11:07:50 +08:00
|
|
|
REF 4aa683775c4ee55594196c79def7a75103d75e4c
|
|
|
|
SHA512 319e33de9fd10da333e5928856d3c3f5a5d5b1b33cf57e395217cb70098588f7959c68f81fd52cd9d5717d334d2e187d29a6591cac249b7bfd65731f0f120f90
|
2018-03-02 00:08:53 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2020-10-13 03:04:28 +08:00
|
|
|
string(COMPARE EQUAL ${VCPKG_CRT_LINKAGE} dynamic USE_DYNAMIC_VCXX_RUNTIME)
|
|
|
|
|
2022-12-14 11:07:50 +08:00
|
|
|
vcpkg_cmake_configure(
|
2018-03-02 00:08:53 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2019-09-12 03:57:02 +08:00
|
|
|
-DOPENCL_ICD_LOADER_HEADERS_DIR=${CURRENT_PACKAGES_DIR}/include
|
2018-03-02 00:08:53 +08:00
|
|
|
)
|
|
|
|
|
2022-12-14 11:07:50 +08:00
|
|
|
vcpkg_cmake_build(TARGET OpenCL)
|
2018-03-02 00:08:53 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2020-05-09 01:42:11 +08:00
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
endif()
|
2019-10-08 01:35:13 +08:00
|
|
|
else()
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2020-05-09 01:42:11 +08:00
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
2019-10-08 01:35:13 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_LINUX)
|
2020-05-09 01:42:11 +08:00
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
2021-01-06 04:44:44 +08:00
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1.2" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
2020-05-09 01:42:11 +08:00
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
2021-01-06 04:44:44 +08:00
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1.2" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
2020-05-09 01:42:11 +08:00
|
|
|
endif()
|
2019-10-08 01:35:13 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_OSX)
|
2020-05-09 01:42:11 +08:00
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
endif()
|
2019-10-08 01:35:13 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2018-03-02 00:08:53 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2019-09-12 03:57:02 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
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})
|