mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
devel/jsoncpp: Fix regression in 'find_package(jsoncpp)'
1.9.6 introduced a regression that find_package is failing: Unknown CMake command "check_required_components" Reported by: Vladimir Druzenko <vvd@freebsd.org>
This commit is contained in:
parent
35ef80124a
commit
9295e1f457
@ -1,5 +1,6 @@
|
||||
PORTNAME= jsoncpp
|
||||
DISTVERSION= 1.9.6
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
|
23
devel/jsoncpp/files/patch-jsoncppConfig.cmake.meson.in
Normal file
23
devel/jsoncpp/files/patch-jsoncppConfig.cmake.meson.in
Normal file
@ -0,0 +1,23 @@
|
||||
- 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)
|
Loading…
Reference in New Issue
Block a user