Detours respects build type (#20776)

* Fix detours port to respect VCPKG_BUILD_TYPE

If the target triplet sets VCPKG_BUILD_TYPE, we can't assume that both '-rel' and 'dbg' build trees exist.

* Bump the port version number.

* Fix tree hash

* Add requested double-quotes around file paths.

* Update tree hash.

Co-authored-by: Pavel Curtis <pavelc@microsoft.com>
This commit is contained in:
Pavel Curtis 2021-10-20 14:48:11 -07:00 committed by GitHub
parent b457967f9e
commit d528237995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 6 deletions

View File

@ -19,8 +19,17 @@ vcpkg_build_nmake(
OPTIONS_DEBUG "DETOURS_CONFIG=Debug"
)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib.${VCPKG_TARGET_ARCHITECTURE}Release/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib.${VCPKG_TARGET_ARCHITECTURE}Debug/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME detours)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib.${VCPKG_TARGET_ARCHITECTURE}Release/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib.${VCPKG_TARGET_ARCHITECTURE}Debug/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include" RENAME detours)
else()
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include" RENAME detours)
endif()
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,7 @@
{
"name": "detours",
"version-string": "4.0.1",
"port-version": 3,
"port-version": 4,
"description": "Detours is a software package for monitoring and instrumenting API calls on Windows.",
"homepage": "https://github.com/microsoft/Detours"
}

View File

@ -1782,7 +1782,7 @@
},
"detours": {
"baseline": "4.0.1",
"port-version": 3
"port-version": 4
},
"devicenameresolver": {
"baseline": "2016-06-26-0850d88fa6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5399f9185e9e7d815bf3c8380e745b5be77c2258",
"version-string": "4.0.1",
"port-version": 4
},
{
"git-tree": "c2b285f4028fc968bc2b4b04f7c3be5a9070d9df",
"version-string": "4.0.1",