Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2018-02-04 02:38:27 +0300
committerRay Molenkamp <github@lazydodo.com>2018-02-04 02:38:27 +0300
commit36c1122b96ca550a541f9cea9ed2673319c7467b (patch)
tree84ca501e92f836c81736e56ca9979b95799efd1c /intern/cycles/cmake
parenta5052770b85fefe00511886429e6fc1f5056e1e8 (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 'intern/cycles/cmake')
-rw-r--r--intern/cycles/cmake/macros.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/cmake/macros.cmake b/intern/cycles/cmake/macros.cmake
new file mode 100644
index 00000000000..f3ca06ac6b8
--- /dev/null
+++ b/intern/cycles/cmake/macros.cmake
@@ -0,0 +1,12 @@
+function(cycles_set_solution_folder target)
+ 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(${target} PROPERTIES FOLDER ${folderdir})
+ endif()
+endfunction()
+
+macro(cycles_add_library target)
+ add_library(${target} ${ARGN})
+ cycles_set_solution_folder(${target})
+endmacro()