2022-08-29 22:28:42 +02:00
|
|
|
if(VCPKG_HOST_IS_WINDOWS)
|
|
|
|
set(USE_GLAD -DNANOGUI_USE_GLAD=ON)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2022-06-30 06:48:26 +08:00
|
|
|
else()
|
2022-08-29 22:28:42 +02:00
|
|
|
set(USE_GLAD -DNANOGUI_USE_GLAD=OFF)
|
2022-06-30 06:48:26 +08:00
|
|
|
endif()
|
|
|
|
|
2019-09-27 08:04:10 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO wjakob/nanogui
|
2022-08-29 22:28:42 +02:00
|
|
|
REF e9ec8a1a9861cf578d9c6e85a6420080aa715c03 # Commits on Sep 23, 2019
|
2019-09-27 08:04:10 +08:00
|
|
|
SHA512 36c93bf977862ced2df4030211e2b83625e60a11fc9fdb6c1f2996bb234758331d3f41a7fbafd25a5bca0239ed9bac9c93446a4a7fac4c5e6d7943af2be3e14a
|
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2020-08-28 07:13:05 +02:00
|
|
|
fix-cmakelists.patch
|
2022-06-30 06:48:26 +08:00
|
|
|
fix-glad-dependence.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2022-08-29 22:28:42 +02:00
|
|
|
FEATURES
|
|
|
|
"example" NANOGUI_BUILD_EXAMPLE
|
2019-09-27 08:04:10 +08:00
|
|
|
)
|
|
|
|
|
2022-08-29 22:28:42 +02:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
|
2022-06-30 06:48:26 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2020-08-28 07:13:05 +02:00
|
|
|
-DNANOGUI_EIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3
|
|
|
|
-DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3
|
2022-08-29 22:28:42 +02:00
|
|
|
-DNANOGUI_BUILD_SHARED=${BUILD_SHARED}
|
2022-06-30 06:48:26 +08:00
|
|
|
${USE_GLAD}
|
2019-09-27 08:04:10 +08:00
|
|
|
)
|
|
|
|
|
2022-06-30 06:48:26 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-09-27 08:04:10 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-06-30 06:48:26 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-09-27 08:04:10 +08:00
|
|
|
|
2022-06-30 06:48:26 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|