project: added project skeleton
Skeleton includes emtpy implementations of application class structure. Source groups were added to CMakeLists to define filters in Visual Studio.
This commit is contained in:
@@ -15,9 +15,9 @@ macro(add_files var_name)
|
||||
|
||||
foreach (_src ${ARGN})
|
||||
if (_relPath)
|
||||
list (APPEND ${var_name} "${CMAKE_SOURCE_DIR}/${_relPath}/${_src}")
|
||||
list (APPEND ${var_name} "${_relPath}/${_src}")
|
||||
else()
|
||||
list (APPEND ${var_name} "${CMAKE_SOURCE_DIR}/${_src}")
|
||||
list (APPEND ${var_name} "${_src}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
macro(create_source_groups)
|
||||
foreach(FILE ${ARGN})
|
||||
get_filename_component(PARENT_DIR "${FILE}" PATH)
|
||||
# skip src or include and changes /'s to \\'s
|
||||
string(REGEX REPLACE "(\\./)?(src|include)/?" "" GROUP "${PARENT_DIR}")
|
||||
string(REPLACE "/" "\\" GROUP "${GROUP}")
|
||||
|
||||
string(LENGTH "${GROUP}" GROUP_NAME_LENGTH)
|
||||
if (${GROUP_NAME_LENGTH} GREATER 0)
|
||||
source_group("${GROUP}" FILES "${FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
Reference in New Issue
Block a user