From 6a6ccb26ec4ba0224361c2a35167214ba70a8ae9 Mon Sep 17 00:00:00 2001 From: Phillip Thomas Date: Sun, 1 Mar 2020 16:16:54 +0100 Subject: Build: show draco library under extern folder in Visual Studio And other code tweaks to make this library more consistent with others. Differential Revision: https://developer.blender.org/D6864 --- build_files/cmake/macros.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'build_files/cmake/macros.cmake') diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 622fc42def8..d082e6e9503 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -170,6 +170,7 @@ function(blender_include_dirs_sys endfunction() function(blender_source_group + name sources ) @@ -205,6 +206,13 @@ function(blender_source_group source_group("${GROUP_ID}" FILES ${_SRC}) endforeach() endif() + + # if enabled, set the FOLDER property for visual studio projects + if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS) + get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) + string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir}) + set_target_properties(${name} PROPERTIES FOLDER ${FolderDir}) + endif() endfunction() @@ -308,14 +316,7 @@ function(blender_add_lib__impl # works fine without having the includes # listed is helpful for IDE's (QtCreator/MSVC) - blender_source_group("${sources}") - - # if enabled, set the FOLDER property for visual studio projects - if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS) - get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) - string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir}) - set_target_properties(${name} PROPERTIES FOLDER ${FolderDir}) - endif() + blender_source_group("${name}" "${sources}") list_assert_duplicates("${sources}") list_assert_duplicates("${includes}") -- cgit v1.2.3