- Keep Prefer-Debian-default-version-of-Python.patch (Debian-specific) - Update Fix-cross-compilation-with-MPI.patch (modified by upstream, targeted for 3.22 release) - Keep Fix-RunCMake.CPack_DEB.EXTRA-on-Debian-non-Linux-OSe.patch (accepted by upstream, targeted for 3.22 release) - Drop Fix-misinterpretation-of-Debian-Policy-on-LIBEXECDIR.patch (applied by upstream) - Keep Make-FindFLTK-safe-to-include-multiple-times.patch (accepted by upstream, targeted for 3.22 release) - Keep Fix-check_symbol_exists-with-pedantic-errors.patch (accepted by upstream, targeted for 3.23 release) Gbp-Dch: full
39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
|
|
Date: Mon, 18 Oct 2021 16:45:01 +0200
|
|
Subject: Make FindFLTK safe to include multiple times
|
|
|
|
Forwarded: not-needed
|
|
|
|
This is a backport of commit 51fd21736b10e2fa04382c5aa71f2044d31e362f
|
|
from the 3.22.x milestone.
|
|
---
|
|
Modules/FindFLTK.cmake | 12 ++++++++----
|
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
|
|
index bab7256..d54d2f6 100644
|
|
--- a/Modules/FindFLTK.cmake
|
|
+++ b/Modules/FindFLTK.cmake
|
|
@@ -152,13 +152,17 @@ if(NOT FLTK_DIR)
|
|
endif()
|
|
|
|
# Check if FLTK was built using CMake
|
|
-if(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
|
|
- set(FLTK_BUILT_WITH_CMAKE 1)
|
|
-endif()
|
|
+foreach(fltk_include IN LISTS FLTK_DIR)
|
|
+ if(EXISTS "${fltk_include}/FLTKConfig.cmake")
|
|
+ set(FLTK_BUILT_WITH_CMAKE 1)
|
|
+ set(FLTK_CMAKE_PATH "${fltk_include}/FLTKConfig.cmake")
|
|
+ break()
|
|
+ endif()
|
|
+endforeach()
|
|
|
|
if(FLTK_BUILT_WITH_CMAKE)
|
|
set(FLTK_FOUND 1)
|
|
- include(${FLTK_DIR}/FLTKConfig.cmake)
|
|
+ include("${FLTK_CMAKE_PATH}")
|
|
|
|
# Fluid
|
|
if(FLUID_COMMAND)
|