msvc: Use source folder structure for project file.
[blender.git] / intern / cycles / cmake / macros.cmake
1 function(cycles_set_solution_folder target)
2         if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
3                 get_filename_component(folderdir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
4                 string(REPLACE ${CMAKE_SOURCE_DIR} "" folderdir ${folderdir})
5                 set_target_properties(${target} PROPERTIES FOLDER ${folderdir})
6         endif()
7 endfunction()
8
9 macro(cycles_add_library target)
10         add_library(${target} ${ARGN})
11         cycles_set_solution_folder(${target})
12 endmacro()