diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-02-04 02:38:27 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-02-04 02:38:27 +0300 |
commit | 36c1122b96ca550a541f9cea9ed2673319c7467b (patch) | |
tree | 84ca501e92f836c81736e56ca9979b95799efd1c /build_files | |
parent | a5052770b85fefe00511886429e6fc1f5056e1e8 (diff) |
msvc: Use source folder structure for project file.
This patch changes the huge list of projects in visual studio into a nice tree matching the source folder structure. see D2823 for details.
Differential Revision: http://developer.blender.org/D2823
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 7 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 406f50eb4f4..8ec2b1c6da5 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -242,6 +242,13 @@ function(blender_add_lib__impl # 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_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() + list_assert_duplicates("${sources}") list_assert_duplicates("${includes}") # Not for system includes because they can resolve to the same path diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index a2fae22a963..ef3ef7b6517 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -31,6 +31,12 @@ endif() # Libraries configuration for Windows when compiling with MSVC. +set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS}) + +if(NOT WITH_PYTHON_MODULE) + set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT blender) +endif() + macro(warn_hardcoded_paths package_name ) if(WITH_WINDOWS_FIND_MODULES) |