mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 20:23:41 +08:00
48 lines
1.5 KiB
CMake
48 lines
1.5 KiB
CMake
include(vcpkg_common_functions)
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO mosra/corrade
|
|
REF 2dd926d23f21042838d9244c00ddd1d2f09861ee
|
|
SHA512 085062a34c4fecc864d02f38d4d45e22f6de72f3599d67327a783c350e478fe943c5bb3f9cd5544953b55b7ffa78923b087bc0f40a54eb9ed9f5d580970b2f45
|
|
HEAD_REF master
|
|
)
|
|
|
|
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 -DBUILD_STATIC=${BUILD_STATIC}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
# Drop a copy of tools
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade)
|
|
|
|
# Tools require dlls
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade)
|
|
|
|
file(GLOB_RECURSE TO_REMOVE
|
|
${CURRENT_PACKAGES_DIR}/bin/*.exe
|
|
${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
file(REMOVE ${TO_REMOVE})
|
|
|
|
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/corrade)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright)
|
|
|
|
vcpkg_copy_pdbs()
|