mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 23:12:04 +08:00
30 lines
1.1 KiB
CMake
30 lines
1.1 KiB
CMake
|
vcpkg_from_github(
|
||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||
|
REPO ned14/status-code
|
||
|
REF ab3cd8217b6a89b91708a497f77f119c096fcce3
|
||
|
SHA512 266c79875fd6edb4a239768da29401193d5b710fe3d06208df010c5ca56bf80fa4558f572c738ab9290ee378437c882d072e93e8fb10fb1e3787b460f40a7102
|
||
|
HEAD_REF master
|
||
|
)
|
||
|
|
||
|
# Because status-code's deployed files are header-only, the debug build is not necessary
|
||
|
set(VCPKG_BUILD_TYPE release)
|
||
|
|
||
|
vcpkg_configure_cmake(
|
||
|
SOURCE_PATH "${SOURCE_PATH}"
|
||
|
PREFER_NINJA
|
||
|
OPTIONS
|
||
|
-DPROJECT_IS_DEPENDENCY=On
|
||
|
)
|
||
|
|
||
|
vcpkg_install_cmake()
|
||
|
|
||
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status-code)
|
||
|
|
||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
||
|
file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")
|
||
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
|
||
|
file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/status-code")
|
||
|
|
||
|
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||
|
file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|