diff options
| author | jasjuang <jasjuang@gmail.com> | 2017-09-22 08:16:32 -0700 |
|---|---|---|
| committer | jasjuang <jasjuang@gmail.com> | 2017-09-22 08:16:32 -0700 |
| commit | f643a8422f87c5a16e3cc77e3e321e34a45f7103 (patch) | |
| tree | 419c9a2e74ab577aab0e868441b9a0e4c15d4919 /ports/jsonnet | |
| parent | 9989177fed607cdc9e20127ff7c22e3266e7c913 (diff) | |
| parent | fac96eb344a500405ab65b7e7f3755af0ad00b7e (diff) | |
| download | vcpkg-f643a8422f87c5a16e3cc77e3e321e34a45f7103.tar.gz vcpkg-f643a8422f87c5a16e3cc77e3e321e34a45f7103.zip | |
Merge branch 'master' of https://github.com/jasjuang/vcpkg
Diffstat (limited to 'ports/jsonnet')
| -rw-r--r-- | ports/jsonnet/CMakeLists.txt | 53 | ||||
| -rw-r--r-- | ports/jsonnet/CONTROL | 3 | ||||
| -rw-r--r-- | ports/jsonnet/portfile.cmake | 29 |
3 files changed, 85 insertions, 0 deletions
diff --git a/ports/jsonnet/CMakeLists.txt b/ports/jsonnet/CMakeLists.txt new file mode 100644 index 000000000..4f749e5b8 --- /dev/null +++ b/ports/jsonnet/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.5.1) +project(jsonnet) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +set( jsonnet_sources + core/desugarer.cpp + core/formatter.cpp + core/lexer.cpp + core/libjsonnet.cpp + core/parser.cpp + core/pass.cpp + core/static_analysis.cpp + core/string_utils.cpp + core/vm.cpp +) + +include_directories(third_party/md5 include cpp core stdlib) + +add_library(md5 STATIC third_party/md5/md5.cpp) + +add_library(libjsonnet ${jsonnet_sources}) +target_link_libraries(libjsonnet md5) + +add_library(libjsonnet++ cpp/libjsonnet++.cpp) +target_link_libraries(libjsonnet++ libjsonnet) + +add_executable(jsonnet cmd/jsonnet.cpp) +target_link_libraries(jsonnet libjsonnet) + + +install( + TARGETS libjsonnet libjsonnet++ + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS jsonnet + RUNTIME DESTINATION tools/jsonnet + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/libjsonnet++.h include/libjsonnet.h DESTINATION include) +endif() diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL new file mode 100644 index 000000000..0254fc14c --- /dev/null +++ b/ports/jsonnet/CONTROL @@ -0,0 +1,3 @@ +Source: jsonnet +Version: 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 +Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake new file mode 100644 index 000000000..0fa1bf14d --- /dev/null +++ b/ports/jsonnet/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/jsonnet + REF 11cf9fa9f2fe8acbb14b096316006082564ca580 + SHA512 77d9c9e86c4c6501a00f089c72dea522dd818ac0c810b603d18bea111f8f8cf9a25039600a9ba158c5f02142e24d49074e7fe0ddf113665eedf4c3ef66bf421a + HEAD_REF master +) + +vcpkg_execute_required_process( + COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME "std.jsonnet" +) + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/jsonnet) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsonnet RENAME copyright) |
