mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 20:59:12 +08:00
52 lines
1.8 KiB
CMake
52 lines
1.8 KiB
CMake
|
###
|
||
|
|
||
|
set(MAGNUM_PLUGINS_HASH 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80)
|
||
|
|
||
|
include(vcpkg_common_functions)
|
||
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-plugins-${MAGNUM_PLUGINS_HASH})
|
||
|
vcpkg_download_distfile(ARCHIVE
|
||
|
URLS "https://github.com/mosra/magnum-plugins/archive/${MAGNUM_PLUGINS_HASH}.zip"
|
||
|
FILENAME "magnum-plugins-${MAGNUM_PLUGINS_HASH}.zip"
|
||
|
SHA512 5ab603f50cee325113e3f1ccd67d294d32f7386334136304ad8135ac8ff0218cbd2834197c7db85bb5fd11c69e28d00217fa5d9dbdad71a83e372722a6f8bda0
|
||
|
)
|
||
|
vcpkg_extract_source_archive(${ARCHIVE})
|
||
|
|
||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||
|
set(BUILD_STATIC 1)
|
||
|
else()
|
||
|
set(BUILD_STATIC 0)
|
||
|
endif()
|
||
|
|
||
|
vcpkg_configure_cmake(
|
||
|
SOURCE_PATH ${SOURCE_PATH}
|
||
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||
|
OPTIONS -DWITH_STBIMAGECONVERTER=ON
|
||
|
OPTIONS -DWITH_STBIMAGEIMPORTER=ON
|
||
|
OPTIONS -DWITH_STBTRUETYPEFONT=ON
|
||
|
OPTIONS -DWITH_STBTRUETYPEFONT=ON
|
||
|
OPTIONS -DWITH_MINIEXRIMAGECONVERTER=ON
|
||
|
OPTIONS -DWITH_OPENGEXIMPORTER=ON
|
||
|
OPTIONS -DWITH_OPENGEXIMPORTER=ON
|
||
|
OPTIONS -DWITH_STANFORDIMPORTER=ON
|
||
|
OPTIONS -DWITH_DRWAVAUDIOIMPORTER=ON
|
||
|
OPTIONS -DWITH_ANYAUDIOIMPORTER=ON
|
||
|
OPTIONS -DWITH_ANYIMAGECONVERTER=ON
|
||
|
OPTIONS -DWITH_ANYSCENEIMPORTER=ON
|
||
|
OPTIONS -DBUILD_STATIC=${BUILD_STATIC}
|
||
|
)
|
||
|
|
||
|
vcpkg_install_cmake()
|
||
|
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||
|
|
||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||
|
endif()
|
||
|
|
||
|
# Handle copyright
|
||
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins)
|
||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright)
|
||
|
|
||
|
vcpkg_copy_pdbs()
|