2018-03-02 00:08:53 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO KhronosGroup/OpenCL-Headers
|
2023-03-30 07:27:21 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 41730e80b267de45db9d7a3bcf9e0f29bfc86b25475a86d50180a7258e1240fc8c8f2ad3e222b03b3ef50c10ef63fb5b1647c056fec615e87965aa3196e8ac60
|
|
|
|
HEAD_REF main
|
2018-03-02 00:08:53 +08:00
|
|
|
)
|
|
|
|
|
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
|
2023-03-30 07:27:21 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 30252a832287375d550a5e184779881d5b22207a636298c7f52f277c219d3a1ae6983259cfea7bf4f90f0840fec114ee0e7a8c1e6a6fe48c24fd3b5119e7a7f8
|
|
|
|
HEAD_REF main
|
2018-03-02 00:08:53 +08:00
|
|
|
)
|
|
|
|
|
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
|
2023-03-30 07:27:21 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 e418b8f3cccb4716ed44acd0677afb96705f8b40a7714d483f1efe1a9b835f4a823c5a80f8457e72c8004f76d8a07c45d9cca55b699dd2fdaa6fe9f8cc863cbd
|
|
|
|
HEAD_REF main
|
2018-03-02 00:08:53 +08:00
|
|
|
)
|
|
|
|
|
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")
|
2023-05-27 04:38:50 +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)
|
2020-05-09 01:42:11 +08:00
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
2023-05-27 04:38:50 +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)
|
2020-05-09 01:42:11 +08:00
|
|
|
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)
|
2023-05-31 09:43:30 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY)
|