Commit ae565a4b authored by Martin Schultz's avatar Martin Schultz

* added recursive folder macro to group files in folders on MSVC

* added grouping to ACG
parent fa554a0e
......@@ -156,6 +156,8 @@ endif ()
# display results
acg_print_configure_header (ACG "ACG")
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR} )
target_link_libraries ( ACG ${OPENMESH_LIBRARIES}
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
......
MACRO (RECURSE_GROUPS dirname)
SET(ALL_FILES)
FILE(GLOB_RECURSE allfiles "${dirname}/*.*")
SET(ALL_FILES ${ALL_FILES} ${allfiles})
STRING(REGEX REPLACE ".*/([^/]*)" "\\1" maindir "${dirname}")
FOREACH(file ${allfiles})
STRING(REGEX REPLACE "${dirname}/(.*)/[^/]*" "\\1" loopdirname "${file}")
STRING(REGEX REPLACE "/" "\\\\" loopdirname "${loopdirname}")
IF(NOT "${file}" MATCHES "${dirname}/(.*)/[^/]*")
source_group("${maindir}" FILES ${file})
ELSE()
source_group("${maindir}\\${loopdirname}" FILES ${file})
ENDIF()
ENDFOREACH()
ENDMACRO (RECURSE_GROUPS)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment