Commit 0f7c9ed5 authored by Martin Schultz's avatar Martin Schultz

* added cmake macro to group files in msvc

parent 2b8dbcf3
......@@ -5,6 +5,27 @@
#
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
################################################################################
# Macro to sort acgl into directories
################################################################################
MACRO (RECURSE_GROUPS dirname)
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)
################################################################################
# Global Settings
################################################################################
......
......@@ -12,6 +12,9 @@ FILE(GLOB_RECURSE SOURCE_FILES_CPP "${ACGL_BASE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HEADER_FILES_H "${ACGL_BASE_DIR}/include/*.h")
FILE(GLOB_RECURSE HEADER_FILES_HH "${ACGL_BASE_DIR}/include/*.hh")
FILE(GLOB_RECURSE HEADER_FILES_HPP "${ACGL_BASE_DIR}/include/*.hpp")
#group files in msvc
RECURSE_GROUPS ("${ACGL_BASE_DIR}/include")
RECURSE_GROUPS ("${ACGL_BASE_DIR}/src")
SET(HEADER_FILES ${HEADER_FILES} ${HEADER_FILES_H} ${HEADER_FILES_HH} ${HEADER_FILES_HPP})
SET(SOURCE_FILES ${SOURCE_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_CC} ${SOURCE_FILES_CPP})
......
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