diff --git a/cmake/SourceFileUtils.cmake b/cmake/SourceFileUtils.cmake index 127fdb1fd..0b89cdb10 100644 --- a/cmake/SourceFileUtils.cmake +++ b/cmake/SourceFileUtils.cmake @@ -24,7 +24,7 @@ # This function expands filenames specified with multiple extensions into separate filenames for # each provided extension. For example # -# path/to/file.{h,cpp} +# path/to/file.{hpp,cpp} # path/to/definitions.h # # is transformed into @@ -42,9 +42,8 @@ function(expand_file_extensions RESULT) foreach (entry IN LISTS ARGN) - # Check for file extension pattern - string(REGEX MATCH "\\.{((hxx|cxx),)+(hxx|cxx)}$" EXT_PATTERN ${entry}) + string(REGEX MATCH "\\.{((hpp|cpp),)+(hpp|cpp)}$" EXT_PATTERN ${entry}) if (NOT EXT_PATTERN) list(APPEND EXPANDED_SOURCES ${entry}) else () @@ -55,7 +54,7 @@ function(expand_file_extensions RESULT) # Obtain basename without extension pattern (e.g. "path/to/file") string(SUBSTRING ${entry} 0 ${BASE_LEN} BASENAME) - # Convert extension pattern to list (e.g. ".{hxx,cpp}" -> "hxx;cpp") + # Convert extension pattern to list (e.g. ".{hpp,cpp}" -> "hpp;cpp") math(EXPR EXT_LEN "${EXT_LEN}-3") string(SUBSTRING ${EXT_PATTERN} 2 ${EXT_LEN} EXT_PATTERN) string(REPLACE "," ";" EXT_PATTERN ${EXT_PATTERN}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7cfbd87cf..2b26bd243 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,8 +6,215 @@ IF (MSVC) ADD_DEFINITIONS("/EHsc") ENDIF (MSVC) -file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS LIST_DIRECTORIES false "*.hpp" "*.cpp" "*.ui" "*.qrc") +set(SOURCE_FILES main.cpp + Application.{hpp,cpp} + BaseSettings.{hpp,cpp} + BaseTheme.{hpp,cpp} + BrowserExtension.{hpp,cpp} + RunGui.{hpp,cpp} + autogenerated/ResourcesAutogen.{hpp,cpp} + common/Args.{hpp,cpp} + common/Channel.{hpp,cpp} + common/ChannelChatters.{hpp,cpp} + common/ChatterinoSetting.{hpp,cpp} + common/CompletionModel.{hpp,cpp} + common/Credentials.{hpp,cpp} + common/DownloadManager.{hpp,cpp} + common/Env.{hpp,cpp} + common/LinkParser.{hpp,cpp} + common/Modes.{hpp,cpp} + common/NetworkManager.{hpp,cpp} + common/NetworkPrivate.{hpp,cpp} + common/NetworkRequest.{hpp,cpp} + common/NetworkResult.{hpp,cpp} + common/QLogging.{hpp,cpp} + common/UsernameSet.{hpp,cpp} + common/Version.{hpp,cpp} + common/WindowDescriptors.{hpp,cpp} + controllers/accounts/Account.{hpp,cpp} + controllers/accounts/AccountController.{hpp,cpp} + controllers/accounts/AccountModel.{hpp,cpp} + controllers/commands/Command.{hpp,cpp} + controllers/commands/CommandController.{hpp,cpp} + controllers/commands/CommandModel.{hpp,cpp} + controllers/filters/FilterModel.{hpp,cpp} + controllers/filters/parser/FilterParser.{hpp,cpp} + controllers/filters/parser/Tokenizer.{hpp,cpp} + controllers/filters/parser/Types.{hpp,cpp} + controllers/highlights/HighlightBlacklistModel.{hpp,cpp} + controllers/highlights/HighlightModel.{hpp,cpp} + controllers/highlights/HighlightPhrase.{hpp,cpp} + controllers/highlights/UserHighlightModel.{hpp,cpp} + controllers/ignores/IgnoreModel.{hpp,cpp} + controllers/moderationactions/ModerationAction.{hpp,cpp} + controllers/moderationactions/ModerationActionModel.{hpp,cpp} + controllers/notifications/NotificationController.{hpp,cpp} + controllers/notifications/NotificationModel.{hpp,cpp} + controllers/pings/MutedChannelModel.{hpp,cpp} + controllers/taggedusers/TaggedUser.{hpp,cpp} + controllers/taggedusers/TaggedUsersModel.{hpp,cpp} + debug/Benchmark.{hpp,cpp} + messages/Emote.{hpp,cpp} + messages/Image.{hpp,cpp} + messages/ImageSet.{hpp,cpp} + messages/Link.{hpp,cpp} + messages/Message.{hpp,cpp} + messages/MessageBuilder.{hpp,cpp} + messages/MessageColor.{hpp,cpp} + messages/MessageContainer.{hpp,cpp} + messages/MessageElement.{hpp,cpp} + messages/SharedMessageBuilder.{hpp,cpp} + messages/layouts/MessageLayout.{hpp,cpp} + messages/layouts/MessageLayoutContainer.{hpp,cpp} + messages/layouts/MessageLayoutElement.{hpp,cpp} + messages/search/AuthorPredicate.{hpp,cpp} + messages/search/LinkPredicate.{hpp,cpp} + messages/search/SubstringPredicate.{hpp,cpp} + providers/IvrApi.{hpp,cpp} + providers/LinkResolver.{hpp,cpp} + providers/bttv/BttvEmotes.{hpp,cpp} + providers/bttv/LoadBttvChannelEmote.{hpp,cpp} + providers/chatterino/ChatterinoBadges.{hpp,cpp} + providers/colors/ColorProvider.{hpp,cpp} + providers/emoji/Emojis.{hpp,cpp} + providers/ffz/FfzBadges.{hpp,cpp} + providers/ffz/FfzEmotes.{hpp,cpp} + providers/irc/AbstractIrcServer.{hpp,cpp} + providers/irc/Irc2.{hpp,cpp} + providers/irc/IrcAccount.{hpp,cpp} + providers/irc/IrcChannel2.{hpp,cpp} + providers/irc/IrcCommands.{hpp,cpp} + providers/irc/IrcConnection2.{hpp,cpp} + providers/irc/IrcMessageBuilder.{hpp,cpp} + providers/irc/IrcServer.{hpp,cpp} + providers/twitch/ChannelPointReward.{hpp,cpp} + providers/twitch/IrcMessageHandler.{hpp,cpp} + providers/twitch/PubsubActions.{hpp,cpp} + providers/twitch/PubsubClient.{hpp,cpp} + providers/twitch/PubsubHelpers.{hpp,cpp} + providers/twitch/TwitchAccount.{hpp,cpp} + providers/twitch/TwitchAccountManager.{hpp,cpp} + providers/twitch/TwitchBadge.{hpp,cpp} + providers/twitch/TwitchBadges.{hpp,cpp} + providers/twitch/TwitchChannel.{hpp,cpp} + providers/twitch/TwitchEmotes.{hpp,cpp} + providers/twitch/TwitchHelpers.{hpp,cpp} + providers/twitch/TwitchIrcServer.{hpp,cpp} + providers/twitch/TwitchMessageBuilder.{hpp,cpp} + providers/twitch/TwitchParseCheerEmotes.{hpp,cpp} + providers/twitch/TwitchUser.{hpp,cpp} + providers/twitch/api/Helix.{hpp,cpp} + providers/twitch/api/Kraken.{hpp,cpp} + singletons/Badges.{hpp,cpp} + singletons/Emotes.{hpp,cpp} + singletons/Fonts.{hpp,cpp} + singletons/Logging.{hpp,cpp} + singletons/NativeMessaging.{hpp,cpp} + singletons/Paths.{hpp,cpp} + singletons/Resources.{hpp,cpp} + singletons/Settings.{hpp,cpp} + singletons/Theme.{hpp,cpp} + singletons/Toasts.{hpp,cpp} + singletons/TooltipPreviewImage.{hpp,cpp} + singletons/Updates.{hpp,cpp} + singletons/WindowManager.{hpp,cpp} + singletons/helper/GifTimer.{hpp,cpp} + singletons/helper/LoggingChannel.{hpp,cpp} + util/Clipboard.{hpp,cpp} + util/DebugCount.{hpp,cpp} + util/FormatTime.{hpp,cpp} + util/FunctionEventFilter.{hpp,cpp} + util/FuzzyConvert.{hpp,cpp} + util/Helpers.{hpp,cpp} + util/IncognitoBrowser.{hpp,cpp} + util/InitUpdateButton.{hpp,cpp} + util/JsonQuery.{hpp,cpp} + util/LayoutHelper.{hpp,cpp} + util/NuulsUploader.{hpp,cpp} + util/RapidjsonHelpers.{hpp,cpp} + util/StreamLink.{hpp,cpp} + util/StreamerMode.{hpp,cpp} + util/Twitch.{hpp,cpp} + util/WindowsHelper.{hpp,cpp} + widgets/AccountSwitchPopup.{hpp,cpp} + widgets/AccountSwitchWidget.{hpp,cpp} + widgets/AttachedWindow.{hpp,cpp} + widgets/BasePopup.{hpp,cpp} + widgets/BaseWidget.{hpp,cpp} + widgets/BaseWindow.{hpp,cpp} + widgets/Label.{hpp,cpp} + widgets/Notebook.{hpp,cpp} + widgets/Scrollbar.{hpp,cpp} + widgets/StreamView.{hpp,cpp} + widgets/TooltipWidget.{hpp,cpp} + widgets/Window.{hpp,cpp} + widgets/dialogs/ChannelFilterEditorDialog.{hpp,cpp} + widgets/dialogs/ColorPickerDialog.{hpp,cpp} + widgets/dialogs/EmotePopup.{hpp,cpp} + widgets/dialogs/IrcConnectionEditor.{hpp,cpp} + widgets/dialogs/LastRunCrashDialog.{hpp,cpp} + widgets/dialogs/LoginDialog.{hpp,cpp} + widgets/dialogs/NotificationPopup.{hpp,cpp} + widgets/dialogs/QualityPopup.{hpp,cpp} + widgets/dialogs/SelectChannelDialog.{hpp,cpp} + widgets/dialogs/SelectChannelFiltersDialog.{hpp,cpp} + widgets/dialogs/SettingsDialog.{hpp,cpp} + widgets/dialogs/TextInputDialog.{hpp,cpp} + widgets/dialogs/UpdateDialog.{hpp,cpp} + widgets/dialogs/UserInfoPopup.{hpp,cpp} + widgets/dialogs/WelcomeDialog.{hpp,cpp} + widgets/dialogs/switcher/NewTabItem.{hpp,cpp} + widgets/dialogs/switcher/QuickSwitcherModel.{hpp,cpp} + widgets/dialogs/switcher/QuickSwitcherPopup.{hpp,cpp} + widgets/dialogs/switcher/SwitchSplitItem.{hpp,cpp} + widgets/helper/Button.{hpp,cpp} + widgets/helper/ChannelView.{hpp,cpp} + widgets/helper/ColorButton.{hpp,cpp} + widgets/helper/ComboBoxItemDelegate.{hpp,cpp} + widgets/helper/DebugPopup.{hpp,cpp} + widgets/helper/EditableModelView.{hpp,cpp} + widgets/helper/EffectLabel.{hpp,cpp} + widgets/helper/NotebookButton.{hpp,cpp} + widgets/helper/NotebookTab.{hpp,cpp} + widgets/helper/QColorPicker.{hpp,cpp} + widgets/helper/ResizingTextEdit.{hpp,cpp} + widgets/helper/ScrollbarHighlight.{hpp,cpp} + widgets/helper/SearchPopup.{hpp,cpp} + widgets/helper/SettingsDialogTab.{hpp,cpp} + widgets/helper/SignalLabel.{hpp,cpp} + widgets/helper/TitlebarButton.{hpp,cpp} + widgets/listview/GenericItemDelegate.{hpp,cpp} + widgets/listview/GenericListItem.{hpp,cpp} + widgets/listview/GenericListModel.{hpp,cpp} + widgets/listview/GenericListView.{hpp,cpp} + widgets/settingspages/AboutPage.{hpp,cpp} + widgets/settingspages/AccountsPage.{hpp,cpp} + widgets/settingspages/CommandPage.{hpp,cpp} + widgets/settingspages/ExternalToolsPage.{hpp,cpp} + widgets/settingspages/FiltersPage.{hpp,cpp} + widgets/settingspages/GeneralPage.{hpp,cpp} + widgets/settingspages/GeneralPageView.{hpp,cpp} + widgets/settingspages/HighlightingPage.{hpp,cpp} + widgets/settingspages/IgnoresPage.{hpp,cpp} + widgets/settingspages/KeyboardSettingsPage.{hpp,cpp} + widgets/settingspages/ModerationPage.{hpp,cpp} + widgets/settingspages/NotificationPage.{hpp,cpp} + widgets/settingspages/SettingsPage.{hpp,cpp} + widgets/splits/ClosedSplits.{hpp,cpp} + widgets/splits/EmoteInputItem.{hpp,cpp} + widgets/splits/EmoteInputPopup.{hpp,cpp} + widgets/splits/Split.{hpp,cpp} + widgets/splits/SplitContainer.{hpp,cpp} + widgets/splits/SplitHeader.{hpp,cpp} + widgets/splits/SplitInput.{hpp,cpp} + widgets/splits/SplitOverlay.{hpp,cpp} + widgets/dialogs/IrcConnectionEditor.ui + ) +# Expand file extensions (i.e. path/to/file.{h,cpp} becomes path/to/file.h;path/to/file.cpp) +expand_file_extensions(SOURCE_FILES ${SOURCE_FILES}) + +# Generate source groups for use in IDEs generate_source_groups(${SOURCE_FILES}) add_executable(${PROJECT_NAME} ${SOURCE_FILES})