diff options
Diffstat (limited to 'vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch')
| -rw-r--r-- | vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch b/vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch new file mode 100644 index 0000000..7a97939 --- /dev/null +++ b/vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch @@ -0,0 +1,60 @@ +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index 9e8ffe2..2eb28d2 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -30,6 +30,7 @@ set(LIBJSONNET_SOURCE + string_utils.cpp + vm.cpp) + ++if (BUILD_SHARED_BINARIES) + add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) + add_dependencies(libjsonnet md5 stdlib) + target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json ryml) +@@ -53,6 +54,7 @@ install(TARGETS libjsonnet + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + target_include_directories(libjsonnet INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>) ++endif() + + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. +@@ -112,3 +114,4 @@ if (BUILD_TESTS) + add_test(jsonnet_test_snippet + ${GLOBAL_OUTPUT_PATH}/jsonnet -e ${TEST_SNIPPET}) + endif() ++install(FILES ${LIB_HEADER} DESTINATION include) +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 153a4a1..08bba4c 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -8,8 +8,8 @@ set(LIBJSONNETPP_SOURCE + libjsonnet++.cpp + ) + ++if (BUILD_SHARED_BINARIES) + add_library(libjsonnet++ SHARED ${LIBJSONNETPP_HEADERS} ${LIBJSONNETPP_SOURCE}) +-add_dependencies(libjsonnet++ jsonnet) + target_link_libraries(libjsonnet++ libjsonnet) + + # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without +@@ -25,11 +25,11 @@ install(TARGETS libjsonnet++ + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + target_include_directories(libjsonnet++ INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>) ++endif() + + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. + add_library(libjsonnet++_static STATIC ${LIBJSONNETPP_SOURCE}) +- add_dependencies(libjsonnet++_static jsonnet) + target_link_libraries(libjsonnet++_static libjsonnet_static) + set_target_properties(libjsonnet++_static PROPERTIES OUTPUT_NAME jsonnet++) + install(TARGETS libjsonnet++_static DESTINATION "${CMAKE_INSTALL_LIBDIR}") +@@ -43,6 +43,7 @@ else() + add_library(libjsonnet++_for_binaries ALIAS libjsonnet++_static) + endif() + ++install(FILES ${LIBJSONNETPP_HEADERS} DESTINATION include) + # Tests + function(add_test_executablepp test_name) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${test_name}.cpp) |