File: reliable-finding

package info (click to toggle)
libsigmf 1.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 692 kB
  • sloc: cpp: 1,236; ansic: 616; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From a85f74a36203056540f5eea9909e148ef707d595 Mon Sep 17 00:00:00 2001
From: "A. Maitland Bottoms" <bottoms@debian.org>
Date: Wed, 4 Jan 2023 21:24:06 -0500
Subject: [PATCH 1/2] reliable finding The CMake interface file names vary
 between recent versions of flatbuffers. This patch handles both cases, for
 initial build and projects using the system-wide installation.

---
 CMakeLists.txt        | 2 +-
 cmake/config.cmake.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ad72df..e41c82f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ set(libsigmf_deps "")
 
 # flatbuffers
 if (${USE_SYSTEM_FLATBUFFERS})
-  find_package(Flatbuffers REQUIRED)
+  find_package(FlatBuffers REQUIRED NAMES FlatBuffers Flatbuffers)
 endif (${USE_SYSTEM_FLATBUFFERS})
 
 if (NOT ${USE_SYSTEM_FLATBUFFERS})
diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in
index 852eb2b..68fb8e0 100644
--- a/cmake/config.cmake.in
+++ b/cmake/config.cmake.in
@@ -13,6 +13,6 @@ if(NOT TARGET @PROJECT_NAME@::@LIBSIGMF_TARGET_NAME@)
   include(CMakeFindDependencyMacro)
 
   find_dependency(nlohmann_json REQUIRED)
-  find_dependency(Flatbuffers REQUIRED)
+  find_dependency(FlatBuffers REQUIRED NAMES FlatBuffers Flatbuffers)
   include("${CMAKE_CURRENT_LIST_DIR}/@LIBSIGMF_TARGETS_EXPORT_NAME@.cmake")
 endif()
-- 
2.39.0