]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/ompl/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / ompl / portfile.cmake
1 vcpkg_buildpath_length_warning(37)
2
3 set(OMPL_VERSION 1.5.1)
4
5 set(FEATURE_PATCHES)
6
7 if("app" IN_LIST FEATURES)
8 vcpkg_download_distfile(ARCHIVE
9 URLS "https://github.com/ompl/omplapp/releases/download/1.5.1/omplapp-1.5.1-Source.tar.gz"
10 FILENAME "omplapp-${OMPL_VERSION}.tar.gz"
11 SHA512 83b1b09d6be776f7e15a748402f0c2f072459921de61a92731daf5171bd1f91a829fbeb6e10a489b92fba0297f6272e7bb6b8f07830c387bb29ccdbc7b3731f3
12 )
13 list(APPEND FEATURE_PATCHES fix_dependency.patch)
14 else()
15 vcpkg_download_distfile(ARCHIVE
16 URLS "https://github.com/ompl/ompl/archive/1.5.1.tar.gz"
17 FILENAME "ompl-${OMPL_VERSION}.tar.gz"
18 SHA512 2f28d29f32f3bb03e67b29ce251e4786364847a25e3c4cf66d7663ed38dca4da71d4e03cf9ce647710d9524a3907c76c09795e77f041cb8822f695d28f5ca570
19 )
20 endif()
21
22 vcpkg_extract_source_archive_ex(
23 OUT_SOURCE_PATH SOURCE_PATH
24 ARCHIVE ${ARCHIVE}
25 REF ${OMPL_VERSION}
26 PATCHES ${FEATURE_PATCHES}
27 )
28
29 # Based on selected features different files get downloaded, so use the following command instead of patch.
30 file(READ ${SOURCE_PATH}/CMakeLists.txt _contents)
31 string(REPLACE "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 REQUIRED CONFIG)" _contents "${_contents}")
32 string(REPLACE "find_package(ccd REQUIRED)" "find_package(ccd REQUIRED CONFIG)" _contents "${_contents}")
33 file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${_contents}")
34
35 vcpkg_configure_cmake(
36 SOURCE_PATH ${SOURCE_PATH}
37 PREFER_NINJA
38 DISABLE_PARALLEL_CONFIGURE
39 OPTIONS
40 -DOMPL_VERSIONED_INSTALL=OFF
41 -DOMPL_REGISTRATION=OFF
42 -DOMPL_BUILD_DEMOS=OFF
43 -DOMPL_BUILD_TESTS=OFF
44 -DOMPL_BUILD_PYBINDINGS=OFF
45 -DOMPL_BUILD_PYTESTS=OFF
46 )
47
48 vcpkg_install_cmake()
49
50 vcpkg_fixup_cmake_targets(CONFIG_PATH share/ompl/cmake)
51
52 # Remove debug distribution and other, move ompl_benchmark to tools/ dir
53 file(REMOVE_RECURSE
54 ${CURRENT_PACKAGES_DIR}/debug/include
55 ${CURRENT_PACKAGES_DIR}/debug/share
56 ${CURRENT_PACKAGES_DIR}/share/man
57 ${CURRENT_PACKAGES_DIR}/share/ompl/demos
58 ${CURRENT_PACKAGES_DIR}/share/ompl/ompl.conf
59 ${CURRENT_PACKAGES_DIR}/share/ompl/plannerarena
60 )
61 if ("app" IN_LIST FEATURES)
62 file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/ompl)
63 file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ompl_benchmark.exe ${CURRENT_PACKAGES_DIR}/tools/ompl/ompl_benchmark.exe)
64 file(REMOVE_RECURSE
65 ${CURRENT_PACKAGES_DIR}/bin
66 ${CURRENT_PACKAGES_DIR}/debug/bin
67 ${CURRENT_PACKAGES_DIR}/include/omplapp/CMakeFiles
68 ${CURRENT_PACKAGES_DIR}/share/ompl/resources
69 ${CURRENT_PACKAGES_DIR}/share/ompl/webapp
70 )
71 endif()
72
73 if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
74 file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
75 endif()
76
77 # Handle copyright
78 file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)