From ded0d0141a13be84bec1f04ac34d5b72e7547164 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Thu, 20 Dec 2018 12:44:22 +0800 Subject: Fix static build --- ports/ponder/portfile.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ports/ponder/portfile.cmake b/ports/ponder/portfile.cmake index ee0267b00..b85378ce3 100644 --- a/ports/ponder/portfile.cmake +++ b/ports/ponder/portfile.cmake @@ -21,12 +21,18 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/ponder/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${PORT}/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/lib/ponder - ${CURRENT_PACKAGES_DIR}/lib/ponder) + ${CURRENT_PACKAGES_DIR}/debug/lib/${PORT} + ${CURRENT_PACKAGES_DIR}/lib/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/${PORT}/config.hpp _contents) + string(REPLACE "ifndef PONDER_STATIC" "if 0 //ifndef PONDER_STATIC" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${PORT}/config.hpp "${_contents}") +endif() # Handle copyright -configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/ponder/copyright COPYONLY) +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) -- cgit v1.2.3