Skip to content

Instantly share code, notes, and snippets.

@KiruyaMomochi
Last active August 24, 2021 07:10
Show Gist options
  • Save KiruyaMomochi/cc4dfde7da51c3b11e45ab1079662693 to your computer and use it in GitHub Desktop.
Save KiruyaMomochi/cc4dfde7da51c3b11e45ab1079662693 to your computer and use it in GitHub Desktop.
Cardioid CMake patch
diff --git a/elec/CMakeLists.txt b/elec/CMakeLists.txt
index 4a526cb..ccc5c76 100644
--- a/elec/CMakeLists.txt
+++ b/elec/CMakeLists.txt
@@ -271,7 +271,7 @@ function(get_recursive_list retvar target prop)
list(APPEND searched ${target})
#message(SEND_ERROR "=== ${target} ${prop} ${searched}")
- set(${retval} "")
+ set(retval "")
get_property(propval TARGET ${target} PROPERTY ${prop} SET)
if (propval)
get_target_property(propval ${target} ${prop})
@@ -287,6 +287,10 @@ function(get_recursive_list retvar target prop)
list(APPEND retval ${recursive_val})
endif()
endforeach()
+
+ if(NOT retval)
+ list(REMOVE_DUPLICATES retval)
+ endif()
set(${retvar} ${retval} PARENT_SCOPE)
#message(SEND_ERROR "--- ${target} ${prop} ${retval}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment