summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-01-18 01:37:34 +0100
committerLioncash <mathew1800@gmail.com>2018-01-18 03:51:43 +0100
commite710a1b9894d835d740ed63c03098fd637f61f63 (patch)
tree7585a15cdf38ea2913a847c738c84e769e43ea77 /CMakeLists.txt
parentMerge pull request #73 from N00byKing/3093 (diff)
downloadyuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.gz
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.bz2
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.lz
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.xz
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.zst
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d814bb74f..aa2154cb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -323,12 +323,14 @@ endif()
# This function should be passed a list of all files in a target. It will automatically generate
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
# one in the filesystem.
-function(create_directory_groups)
+function(create_target_directory_groups target_name)
# Place any files that aren't in the source list in a separate group so that they don't get in
# the way.
source_group("Other Files" REGULAR_EXPRESSION ".")
- foreach(file_name ${ARGV})
+ get_target_property(target_sources "${target_name}" SOURCES)
+
+ foreach(file_name IN LISTS target_sources)
get_filename_component(dir_name "${file_name}" PATH)
# Group names use '\' as a separator even though the entire rest of CMake uses '/'...
string(REPLACE "/" "\\" group_name "${dir_name}")