From 1e76e4fc4beecfa217d4af83cd91519b0de2220f Mon Sep 17 00:00:00 2001 From: Alvin <52727318+AlvinZhangH@users.noreply.github.com> Date: Wed, 18 Sep 2019 00:53:59 +0800 Subject: [PATCH] [jinja2cpplight] Add new port (#8207) * [jinja2cpplight]Add new port. * [jinja2cpplight]Add platform judgement. * [jinja2cpplight]Add platform judgement 'jinja2cpplight doesn't support UWP.' --- ports/jinja2cpplight/CONTROL | 4 +++ ports/jinja2cpplight/portfile.cmake | 39 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/jinja2cpplight/CONTROL create mode 100644 ports/jinja2cpplight/portfile.cmake diff --git a/ports/jinja2cpplight/CONTROL b/ports/jinja2cpplight/CONTROL new file mode 100644 index 0000000000..57334bc42c --- /dev/null +++ b/ports/jinja2cpplight/CONTROL @@ -0,0 +1,4 @@ +Source: jinja2cpplight +Version: 2018-05-08 +Homepage: https://github.com/hughperkins/Jinja2CppLight +Description: (very) lightweight version of Jinja2 for C++, Lightweight templating engine for C++, based on Jinja2. \ No newline at end of file diff --git a/ports/jinja2cpplight/portfile.cmake b/ports/jinja2cpplight/portfile.cmake new file mode 100644 index 0000000000..49eff20344 --- /dev/null +++ b/ports/jinja2cpplight/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "jinja2cpplight doesn't support UWP.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +else() + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hughperkins/Jinja2CppLight + REF 04196b080adf6edb86184824a1cf948ace310d19 #Commits on May 8, 2018 + SHA512 30415da5ebc4fb805953cc9ff7e5fcd357d6fa1818c1ff2570b795252de6215562cd0f2f0418a1fa60e9d74b88339a3fea7166b898f54cface6ab1cfe3581bb5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + + +file(GLOB_RECURSE JINJA2CPPLIGHT_EXES ${CURRENT_PACKAGES_DIR}/bin/jinja2cpplight_unittests*) +file(COPY ${JINJA2CPPLIGHT_EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE_RECURSE ${JINJA2CPPLIGHT_EXES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file