mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 20:06:18 +08:00
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.
This commit is contained in:
+3
-1
@@ -658,8 +658,10 @@ set(OPTIONAL_INCLUDES)
|
|||||||
macro(append_optional_libs targets)
|
macro(append_optional_libs targets)
|
||||||
foreach(_target ${targets})
|
foreach(_target ${targets})
|
||||||
get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES)
|
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)
|
get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
list(APPEND OPTIONAL_LIBS ${_link_libraries})
|
|
||||||
if(_include_dirs)
|
if(_include_dirs)
|
||||||
list(APPEND OPTIONAL_INCLUDES ${_include_dirs})
|
list(APPEND OPTIONAL_INCLUDES ${_include_dirs})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user