diff options
| author | myd7349 <myd7349@gmail.com> | 2018-12-20 12:44:22 +0800 |
|---|---|---|
| committer | myd7349 <myd7349@gmail.com> | 2018-12-20 12:44:22 +0800 |
| commit | ded0d0141a13be84bec1f04ac34d5b72e7547164 (patch) | |
| tree | 3c7466cc71390713bb9f5c5826f68ebc57d64c59 | |
| parent | 13710d5854d5fdda7ae181707bb3b529c440e2f1 (diff) | |
| download | vcpkg-ded0d0141a13be84bec1f04ac34d5b72e7547164.tar.gz vcpkg-ded0d0141a13be84bec1f04ac34d5b72e7547164.zip | |
Fix static build
| -rw-r--r-- | ports/ponder/portfile.cmake | 14 |
1 files 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)
|
