blender/intern/cycles/cmake/macros.cmake
Ray Molenkamp 36c1122b96 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
2018-02-03 16:38:27 -07:00

13 lines
426 B
CMake

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()