diff --git a/ports/detours/CONTROL b/ports/detours/CONTROL index 4998741bde6..fdf9fa6a477 100644 --- a/ports/detours/CONTROL +++ b/ports/detours/CONTROL @@ -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. \ No newline at end of file diff --git a/ports/detours/portfile.cmake b/ports/detours/portfile.cmake index fbb8136dade..5e685a4c3cc 100644 --- a/ports/detours/portfile.cmake +++ b/ports/detours/portfile.cmake @@ -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)