2024-01-11 09:04:32 +08:00
|
|
|
if(NOT VCPKG_HOST_IS_WINDOWS)
|
|
|
|
message(WARNING "${PORT} currently requires the following programs from the system package manager:
|
|
|
|
libgl libglu
|
|
|
|
On Debian and Ubuntu derivatives:
|
|
|
|
sudo apt-get install libgl-dev libglu1-mesa-dev
|
|
|
|
On CentOS and recent Red Hat derivatives:
|
|
|
|
yum install mesa-libGL-devel mesa-libGLU-devel
|
|
|
|
On Fedora derivatives:
|
|
|
|
sudo dnf install mesa-libGL-devel mesa-libGLU-devel
|
|
|
|
On Arch Linux and derivatives:
|
|
|
|
sudo pacman -S gl glu
|
|
|
|
On Alpine:
|
|
|
|
apk add gl glu\n")
|
|
|
|
endif()
|
|
|
|
|
2020-12-17 16:15:40 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Coin3D/coin
|
2024-01-11 09:04:32 +08:00
|
|
|
REF "v${VERSION}"
|
2023-12-19 05:18:02 +08:00
|
|
|
SHA512 f913f1b1ec5819d72e054dc94702effe9ee2a28547fc9bebc2f6b2e55d8a67c6cfa05e43239461e806cbead0a7548f82b31d5b86181eed4ffc5c801d3b94aa67
|
2020-12-17 16:15:40 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2023-12-19 05:18:02 +08:00
|
|
|
remove-default-config.patch
|
2020-12-17 16:15:40 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(COIN_BUILD_SHARED_LIBS OFF)
|
|
|
|
else()
|
|
|
|
set(COIN_BUILD_SHARED_LIBS ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
|
|
set(COIN_BUILD_MSVC_STATIC_RUNTIME OFF)
|
|
|
|
elseif(VCPKG_CRT_LINKAGE STREQUAL static)
|
|
|
|
set(COIN_BUILD_MSVC_STATIC_RUNTIME ON)
|
|
|
|
endif()
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-12-17 16:15:40 +08:00
|
|
|
OPTIONS
|
2024-01-23 02:56:30 +08:00
|
|
|
-DCMAKE_CXX_STANDARD=11 # Boost v1.84.0 libraries require C++11
|
2020-12-17 16:15:40 +08:00
|
|
|
-DCOIN_BUILD_DOCUMENTATION=OFF
|
|
|
|
-DCOIN_BUILD_MSVC_STATIC_RUNTIME=${COIN_BUILD_MSVC_STATIC_RUNTIME}
|
|
|
|
-DCOIN_BUILD_SHARED_LIBS=${COIN_BUILD_SHARED_LIBS}
|
|
|
|
-DCOIN_BUILD_TESTS=OFF
|
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-12-17 16:15:40 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-12-19 05:18:02 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Coin-${VERSION})
|
2020-12-17 16:15:40 +08:00
|
|
|
|
2024-01-11 09:04:32 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
2020-12-17 16:15:40 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2023-03-07 07:44:04 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2020-12-17 16:15:40 +08:00
|
|
|
endif()
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Coin/profiler")
|
2022-01-26 02:31:15 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|