mirror of
https://git.freebsd.org/ports.git
synced 2025-04-30 02:26:38 -04:00
1.9.6 introduced a regression that find_package is failing: Unknown CMake command "check_required_components" Reported by: Vladimir Druzenko <vvd@freebsd.org>
23 lines
718 B
Text
23 lines
718 B
Text
- workaround for https://github.com/open-source-parsers/jsoncpp/issues/1568
|
|
- [1.9.6 regression] 'find_package(jsoncpp REQUIRED)' fails: Unknown CMake command "check_required_components"
|
|
|
|
--- jsoncppConfig.cmake.meson.in.orig 2024-09-13 17:50:33 UTC
|
|
+++ jsoncppConfig.cmake.meson.in
|
|
@@ -3,6 +3,17 @@
|
|
@MESON_SHARED_TARGET@
|
|
@MESON_STATIC_TARGET@
|
|
|
|
+macro(check_required_components _NAME)
|
|
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
|
+ if(NOT ${_NAME}_${comp}_FOUND)
|
|
+ if(${_NAME}_FIND_REQUIRED_${comp})
|
|
+ set(${_NAME}_FOUND FALSE)
|
|
+ endif()
|
|
+ endif()
|
|
+ endforeach()
|
|
+endmacro()
|
|
+
|
|
+
|
|
include ( "${CMAKE_CURRENT_LIST_DIR}/jsoncpp-namespaced-targets.cmake" )
|
|
|
|
check_required_components(JsonCpp)
|