[detours] Update for vcpkg_build_nmake

This commit is contained in:
Charles Milette 2019-11-01 14:45:30 -04:00
parent 38570e216e
commit d51773dd7c
No known key found for this signature in database
GPG Key ID: 1A5AE81377AD973A
2 changed files with 11 additions and 12 deletions

View File

@ -1,3 +1,3 @@
Source: detours
Version: 4.0.1
Version: 4.0.1-1
Description: Detours is a software package for monitoring and instrumenting API calls on Windows.

View File

@ -1,5 +1,4 @@
include(vcpkg_common_functions)
find_program(NMAKE nmake)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
@ -13,16 +12,16 @@ vcpkg_from_github(
find-jmp-bounds-arm64.patch
)
set(ENV{DETOURS_TARGET_PROCESSOR} "${VCPKG_TARGET_ARCHITECTURE}")
vcpkg_execute_required_process(
COMMAND ${NMAKE}
WORKING_DIRECTORY ${SOURCE_PATH}/src
LOGNAME build-${TARGET_TRIPLET}
vcpkg_build_nmake(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH "src"
PROJECT_NAME "Makefile"
OPTIONS "PROCESSOR_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}"
NO_DEBUG
)
# Detours does not differentiate between Release and Debug builds, use the same binaries for both.
file(INSTALL ${SOURCE_PATH}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${SOURCE_PATH}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR})
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME detours)
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)