diff options
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) |