wxWidgets/build/cmake/source_groups.cmake
Maarten Bent cbf081db91 CMake: fix RegularExpression::compile errors
When the wxWidgets sources are in a path containing '++', CMake would
show errors on the command line:

[cmake] RegularExpression::compile(): Nested *?+.
[cmake] RegularExpression::compile(): Error in compile

This happens because the full path was interpreted as a regular
expression when creating the source_groups. Without wxSOURCE_DIR the
regular expressions still match and create correct source groups, so
remove it.

See #22738, #23943.

(cherry picked from commit b9b0724de141696edf817fb032aa51daf699b48b)
2023-10-06 01:11:13 +02:00

33 lines
1.8 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 "/include/wx/.*\\.h")
source_group("Common Sources" REGULAR_EXPRESSION "/src/common/.*")
source_group("GTK+ Sources" REGULAR_EXPRESSION "/src/gtk/.*")
source_group("MSW Sources" REGULAR_EXPRESSION "/src/msw/.*")
source_group("OSX Sources" REGULAR_EXPRESSION "/src/osx/.*")
source_group("Generic Sources" REGULAR_EXPRESSION "/src/generic/.*")
source_group("wxUniv Sources" REGULAR_EXPRESSION "/src/univ/.*")
source_group("wxHTML Sources" REGULAR_EXPRESSION "/src/html/.*")
source_group("Setup Headers" REGULAR_EXPRESSION "/include/.*/setup.h")
source_group("GTK+ Headers" REGULAR_EXPRESSION "/include/wx/gtk/.*")
source_group("MSW Headers" REGULAR_EXPRESSION "/include/wx/msw/.*")
source_group("OSX Headers" REGULAR_EXPRESSION "/include/wx/osx/.*")
source_group("Generic Headers" REGULAR_EXPRESSION "/include/wx/generic/.*")
source_group("wxUniv Headers" REGULAR_EXPRESSION "/include/wx/univ/.*")
source_group("wxHTML Headers" REGULAR_EXPRESSION "/include/wx/html/.*")
source_group("Setup Headers" FILES ${wxSETUP_HEADER_FILE})
source_group("Resource Files" REGULAR_EXPRESSION "/[^.]*.(rc|ico|png|icns|manifest|plist)$")
source_group("CMake" REGULAR_EXPRESSION "(CMakeLists\\.txt|cmake_pch.*|.*_CXX_prefix\\.hxx\\.rule)$")
endfunction()