2017-06-08 03:08:08 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-06-10 11:38:25 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO mosra/corrade
|
2017-06-15 22:49:43 +08:00
|
|
|
REF c182fe636894a998f241212d0205d0c126b7926f
|
2017-09-13 04:32:26 +08:00
|
|
|
SHA512 d664c7884c0c6c7977261a851948b2b591ac0fbdbcfddab1d8e578e629a252f48fa786cf9f96525e10aa76c95919dfc3452ccbe5e930aa4a69e61269e4ee07ee
|
2017-06-10 11:38:25 +08:00
|
|
|
HEAD_REF master
|
2017-06-08 03:08:08 +08:00
|
|
|
)
|
|
|
|
|
2017-06-08 07:48:04 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(BUILD_STATIC 1)
|
|
|
|
else()
|
|
|
|
set(BUILD_STATIC 0)
|
|
|
|
endif()
|
|
|
|
|
2017-06-08 03:08:08 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
2017-06-08 07:48:04 +08:00
|
|
|
OPTIONS -DBUILD_STATIC=${BUILD_STATIC}
|
2017-06-08 03:08:08 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
|
|
|
# Drop a copy of tools
|
2017-06-10 11:38:25 +08:00
|
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade)
|
|
|
|
|
2017-06-08 03:08:08 +08:00
|
|
|
# Tools require dlls
|
2017-06-10 11:38:25 +08:00
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade)
|
2017-06-08 03:08:08 +08:00
|
|
|
|
|
|
|
file(GLOB_RECURSE TO_REMOVE
|
|
|
|
${CURRENT_PACKAGES_DIR}/bin/*.exe
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
file(REMOVE ${TO_REMOVE})
|
|
|
|
|
2017-06-08 07:48:04 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
|
|
|
|
2017-06-08 03:08:08 +08:00
|
|
|
# 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)
|
|
|
|
|
2017-09-13 04:32:26 +08:00
|
|
|
vcpkg_copy_pdbs()
|