]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/arrayfire/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / arrayfire / portfile.cmake
1 vcpkg_from_github(
2 OUT_SOURCE_PATH SOURCE_PATH
3 REPO arrayfire/arrayfire
4 REF 59ac7b980d1ae124aae914fb29cbf086c948954d # v3.7.3
5 SHA512 e8c209a5249046cb8d68877463b4f4921cfc363ec2f9b070ba67c9e00cbe7b44d5db209922dabc47e53977ff918e7f0d289f85c7571a826c2050d0ee8deae3e0
6 HEAD_REF master
7 PATCHES build.patch
8 )
9
10 # arrayfire cpu thread lib needed as a submodule for the CPU backend
11 vcpkg_from_github(
12 OUT_SOURCE_PATH CPU_THREADS_PATH
13 REPO arrayfire/threads
14 REF b666773940269179f19ef11c8f1eb77005e85d9a
15 SHA512 b3e8b54acf3a588b1f821c2774d5da2d8f8441962c6d99808d513f7117278b9066eb050b8b501bddbd3882e68eb5cc5da0b2fca54e15ab1923fe068a3fe834f5
16 HEAD_REF master
17 )
18
19 # Get forge. We only need headers and aren't actually linking.
20 # We don't want to use the vcpkg dependency since it is broken in many
21 # environments - see https://github.com/microsoft/vcpkg/issues/14864. This
22 # can be relaxed when the issue is fixed. Forge and its dependencies
23 # are still runtime dependencies, so the user can use the graphics
24 # library by installing forge and freeimage.
25 vcpkg_from_github(
26 OUT_SOURCE_PATH FORGE_PATH
27 REPO arrayfire/forge
28 REF 1a0f0cb6371a8c8053ab5eb7cbe3039c95132389 # v1.0.5
29 SHA512 8f8607421880a0f0013380eb5efb3a4f05331cd415d68c9cd84dd57eb727da1df6223fc6d65b106675d6aa09c3388359fab64443c31fadadf7641161be6b3b89
30 HEAD_REF master
31 )
32
33 ################################### Build ###################################
34
35 # Default flags
36 set(AF_DEFAULT_VCPKG_CMAKE_FLAGS
37 -DBUILD_TESTING=OFF
38 -DAF_BUILD_DOCS=OFF
39 -DAF_BUILD_EXAMPLES=OFF
40 -DUSE_CPU_MKL=ON
41 -DUSE_OPENCL_MKL=ON
42 -DAF_CPU_THREAD_PATH=${CPU_THREADS_PATH} # for building the arrayfire cpu threads lib
43 -DAF_FORGE_PATH=${FORGE_PATH} # forge headers for building the graphics lib
44 -DAF_BUILD_FORGE=OFF
45 -DAF_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/${PORT} # for CMake configs/targets
46 )
47
48 # bin/dll directory for Windows non-static builds for the unified backend dll
49 if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
50 set(AF_BIN_DIR ${CURRENT_PACKAGES_DIR})
51 list(APPEND AF_DEFAULT_VCPKG_CMAKE_FLAGS "-DAF_BIN_DIR=${AF_BIN_DIR}")
52 endif()
53
54 if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
55 message(WARNING "NOTE: Windows support with static linkeage is still experimental.")
56 endif()
57
58 # Determine which backend to build via specified feature
59 vcpkg_check_features(
60 OUT_FEATURE_OPTIONS AF_BACKEND_FEATURE_OPTIONS
61 FEATURES
62 unified AF_BUILD_UNIFIED
63 cpu AF_BUILD_CPU
64 cuda AF_BUILD_CUDA
65 opencl AF_BUILD_OPENCL
66 )
67
68 # Build and install
69 vcpkg_configure_cmake(
70 SOURCE_PATH ${SOURCE_PATH}
71 PREFER_NINJA
72 OPTIONS
73 ${AF_DEFAULT_VCPKG_CMAKE_FLAGS}
74 ${AF_BACKEND_FEATURE_OPTIONS}
75 )
76 vcpkg_install_cmake()
77
78 vcpkg_copy_pdbs()
79
80 file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
81 file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
82
83 # Copyright and license
84 file(INSTALL ${SOURCE_PATH}/COPYRIGHT.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
85 file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)