summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2025-01-21 14:23:27 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2025-01-21 14:23:27 +0100
commit6c3a71181b3bcb69971b2aabc897f9a855ef80fa (patch)
treead83121db50d928b23c50e86921d75f7b123c526 /src
parent2dd4bdeef74d9110ef1effeb9ee45a46072d4f5b (diff)
CMake: check INTERFACE_LINK_LIBRARIES for empty value
This is a safety for consistency. It doesn't really change the result but avoids "adding" an empty argument to a CMake list.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 35ae3074a..c5180ba3f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -658,8 +658,10 @@ set(OPTIONAL_INCLUDES)
macro(append_optional_libs targets)
foreach(_target ${targets})
get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES)
+ if(_link_libraries)
+ list(APPEND OPTIONAL_LIBS ${_link_libraries})
+ endif()
get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES)
- list(APPEND OPTIONAL_LIBS ${_link_libraries})
if(_include_dirs)
list(APPEND OPTIONAL_INCLUDES ${_include_dirs})
endif()