macros.cmake 556 B

12345678910111213141516
  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. macro(cycles_add_library target library_deps)
  9. add_library(${target} ${ARGN})
  10. if(NOT ("${library_deps}" STREQUAL ""))
  11. target_link_libraries(${target} "${library_deps}")
  12. endif()
  13. cycles_set_solution_folder(${target})
  14. endmacro()