diff options
| author | Tom Henoch <40023589+Tom-Henoch@users.noreply.github.com> | 2018-10-22 18:08:46 +0200 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-10-22 09:08:46 -0700 |
| commit | 13e4ca65872c0f3ad9413a5b937c467708e53e03 (patch) | |
| tree | c7b59ceee1617efe89d76f24a0a6dc68a47cee87 | |
| parent | 2db456f44a98e3ec0165325406d4f52b8e70cb0f (diff) | |
| download | vcpkg-13e4ca65872c0f3ad9413a5b937c467708e53e03.tar.gz vcpkg-13e4ca65872c0f3ad9413a5b937c467708e53e03.zip | |
plustache inital port (#4261)
* plustache port
* [plustache] Prefer static linking
* [plustache] Requires boost-algorithm
| -rw-r--r-- | ports/plustache/CMakeLists.txt | 36 | ||||
| -rw-r--r-- | ports/plustache/CONTROL | 4 | ||||
| -rw-r--r-- | ports/plustache/portfile.cmake | 28 |
3 files changed, 68 insertions, 0 deletions
diff --git a/ports/plustache/CMakeLists.txt b/ports/plustache/CMakeLists.txt new file mode 100644 index 000000000..f9579c0c6 --- /dev/null +++ b/ports/plustache/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+project(plustache LANGUAGES CXX)
+
+find_package(Boost REQUIRED COMPONENTS regex)
+
+add_library(
+ plustache
+
+ src/template.cpp
+ src/context.cpp
+ )
+
+
+target_include_directories(
+ plustache
+
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/include
+ PRIVATE
+ ${Boost_INCLUDE_DIRS}
+)
+
+target_link_libraries(
+ plustache
+
+ PRIVATE
+ ${Boost_LIBRARIES}
+)
+
+
+install(TARGETS plustache
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/plustache DESTINATION include)
diff --git a/ports/plustache/CONTROL b/ports/plustache/CONTROL new file mode 100644 index 000000000..f01f1598b --- /dev/null +++ b/ports/plustache/CONTROL @@ -0,0 +1,4 @@ +Source: plustache +Version: 0.4.0-1 +Description: {{mustaches}} for C++ +Build-Depends: boost-regex, boost-algorithm diff --git a/ports/plustache/portfile.cmake b/ports/plustache/portfile.cmake new file mode 100644 index 000000000..237e1b26f --- /dev/null +++ b/ports/plustache/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mrtazz/plustache + REF 3208529343e1858cfe504041be8c1fa0af0a59d1 + SHA512 8d9ae368b2f276da2faaf4e3b543fc7ded88ebd8fbe33544aa7d85765a38d085d4c31bb68f6a2f73d4f660da1618d187fb94c74a5f6594e7642bf3949707c67b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plustache) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/plustache/LICENSE ${CURRENT_PACKAGES_DIR}/share/plustache/copyright) |
