diff options
| author | Darryl Pogue <darryl@dpogue.ca> | 2017-10-06 23:17:35 -0700 |
|---|---|---|
| committer | Darryl Pogue <darryl@dpogue.ca> | 2017-10-08 22:04:07 -0700 |
| commit | a3f68f5d01deb65becea0e93b95512559f47d31a (patch) | |
| tree | 6a653da497e64e413440702116add55d4c879711 | |
| parent | 04970ecc201b0973387afb888a05653f940c0670 (diff) | |
| download | vcpkg-a3f68f5d01deb65becea0e93b95512559f47d31a.tar.gz vcpkg-a3f68f5d01deb65becea0e93b95512559f47d31a.zip | |
[string_theory] Initial port
| -rw-r--r-- | ports/string-theory/CONTROL | 3 | ||||
| -rw-r--r-- | ports/string-theory/portfile.cmake | 42 |
2 files changed, 45 insertions, 0 deletions
diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL new file mode 100644 index 000000000..63bc5b656 --- /dev/null +++ b/ports/string-theory/CONTROL @@ -0,0 +1,3 @@ +Source: string-theory +Version: 1.6 +Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake new file mode 100644 index 000000000..8a6cb1fd1 --- /dev/null +++ b/ports/string-theory/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zrax/string_theory + REF 1.6 + SHA512 5bc99b6dfc2ab43d2812ee47dfbbeeb68106da39b2349799ab924f009270166ebb5508f87a37e634fbfa5495dd263697a582404650eedc5393722761c5ce2028 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ST_BUILD_STATIC ON) +else() + set(ST_BUILD_STATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DST_BUILD_STATIC=${ST_BUILD_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/string_theory") + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory ${CURRENT_PACKAGES_DIR}/share/string_theory) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/string-theory) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory/LICENSE ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright) +file(COPY ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/string_theory/copyright) |
