wxWidgets/build/cmake/source_groups.cmake
Maarten Bent 05917b04ae CMake: Add source group for CMake files
Add all of the CMake related files together in one group/filter.
This includes the CMakeLists.txt of the project, cmake_pch.[hxx,cxx] when
using CMake's precompiled header feature, and a .rule file created by cotire.

Also include manifest files in the Resource group. Even though they are not
visible (in VS2022), they would create an empty MSW Headers group for samples.
2022-04-11 23:29:16 +02:00

33 lines
2.0 KiB
CMake

#############################################################################
# Name: build/cmake/source_groups.cmake
# Purpose: CMake source groups file
# Author: Tobias Taschner
# Created: 2016-10-14
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
# Define source groups for supported IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
function(wx_set_source_groups)
source_group("Common Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/.*\\.h")
source_group("Common Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/common/.*")
source_group("GTK+ Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/gtk/.*")
source_group("MSW Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/msw/.*")
source_group("OSX Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/osx/.*")
source_group("Generic Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/generic/.*")
source_group("wxUniv Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/univ/.*")
source_group("wxHTML Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/html/.*")
source_group("Setup Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/.*/setup.h")
source_group("GTK+ Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/gtk/.*")
source_group("MSW Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/msw/.*")
source_group("OSX Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/osx/.*")
source_group("Generic Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/generic/.*")
source_group("wxUniv Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/univ/.*")
source_group("wxHTML Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/html/.*")
source_group("Setup Headers" FILES ${wxSETUP_HEADER_FILE})
source_group("Resource Files" REGULAR_EXPRESSION "${wxSOURCE_DIR}/[^.]*.(rc|ico|png|icns|manifest)$")
source_group("CMake" REGULAR_EXPRESSION "(CMakeLists\\.txt|cmake_pch.*|.*_CXX_prefix\\.hxx\\.rule)$")
endfunction()