2018-09-05 07:20:46 +08:00
|
|
|
# Note: upstream GitLab instance at https://graphics.rwth-aachen.de:9000 often goes down
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2024-02-07 05:14:45 +08:00
|
|
|
URLS "https://www.openmesh.org/media/Releases/${VERSION}/OpenMesh-${VERSION}.0.tar.gz"
|
2018-09-05 07:20:46 +08:00
|
|
|
FILENAME "OpenMesh-${VERSION}.tar.gz"
|
2024-02-07 05:14:45 +08:00
|
|
|
SHA512 b895e5eaabdf5d3671625df5314e1f95921ac672e9d9d945a5cf0973e20b4e395aac6517d86269a2e8c103f32bc9c8c2ecf57d811a260bbc69f592043e1307ba
|
2018-09-05 07:20:46 +08:00
|
|
|
)
|
|
|
|
|
2022-10-26 11:47:31 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2018-09-05 07:20:46 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2024-02-03 03:48:09 +08:00
|
|
|
PATCHES
|
|
|
|
fix-library-install-path.patch
|
2024-02-07 05:14:45 +08:00
|
|
|
fix-pkgconfig.patch
|
|
|
|
|
|
|
|
# This patch is a combination of these two:
|
|
|
|
# https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/commit/1d4a866282ace376c8e3ba05c21ce3bcc6643040
|
|
|
|
# https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/commit/a7f30b6f70447932444f5b518840ca26e9461fa9
|
|
|
|
restore-c++11-compatibility.patch
|
2018-03-14 22:24:39 +08:00
|
|
|
)
|
|
|
|
|
2020-06-24 04:12:14 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
set(OPENMESH_BUILD_SHARED ON)
|
|
|
|
else()
|
|
|
|
set(OPENMESH_BUILD_SHARED OFF)
|
|
|
|
endif()
|
|
|
|
|
2022-10-26 11:47:31 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-07-14 04:37:29 +08:00
|
|
|
OPTIONS
|
2020-06-24 04:12:14 +08:00
|
|
|
-DBUILD_APPS=OFF
|
2024-02-07 05:14:45 +08:00
|
|
|
-DVCI_COMMON_DO_NOT_COPY_POST_BUILD=ON
|
|
|
|
-DVCI_NO_LIBRARY_INSTALL=ON
|
2020-06-24 04:12:14 +08:00
|
|
|
-DOPENMESH_BUILD_SHARED=${OPENMESH_BUILD_SHARED}
|
2022-10-26 11:47:31 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
OPENMESH_BUILD_SHARED
|
2020-06-24 04:12:14 +08:00
|
|
|
# [TODO]: add apps as feature, requires qt5 and freeglut
|
2018-03-14 22:24:39 +08:00
|
|
|
)
|
|
|
|
|
2022-10-26 11:47:31 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-03-14 22:24:39 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2024-02-03 03:48:09 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenMesh CONFIG_PATH "share/OpenMesh/cmake")
|
2021-10-27 07:03:33 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2022-10-26 11:47:31 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/OpenMesh/Tools/VDPM/xpm")
|
2018-03-14 22:24:39 +08:00
|
|
|
|
2022-10-26 11:47:31 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|