File: 0004-Fix-combine_static_libs-macro.patch

package info (click to toggle)
filament 1.9.25%2Bdfsg3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,404 kB
  • sloc: cpp: 762,244; asm: 77,287; ansic: 31,754; python: 9,629; javascript: 7,293; cs: 4,310; yacc: 3,650; sh: 2,269; java: 1,549; pascal: 419; makefile: 376; xml: 94; ruby: 88; lisp: 9
file content (26 lines) | stat: -rw-r--r-- 913 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
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Sat, 23 Oct 2021 19:19:52 +0200
Subject: Fix combine_static_libs macro

---
 CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d827c61..55c48e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -495,7 +495,12 @@ function(combine_static_libs TARGET OUTPUT DEPS)
     # Loop through the dependent libraries and query their location on disk.
     set(DEPS_FILES )
     foreach(DEPENDENCY ${DEPS})
-        list(APPEND DEPS_FILES "$<TARGET_FILE:${DEPENDENCY}>")
+        if(TARGET ${DEPENDENCY})
+            get_property(dep_type TARGET ${DEPENDENCY} PROPERTY TYPE)
+            if(dep_type STREQUAL "STATIC_LIBRARY")
+                list(APPEND DEPS_FILES "$<TARGET_FILE:${DEPENDENCY}>")
+            endif()
+        endif()
     endforeach()
 
     add_custom_command(