From 925d7afaf87bf79ca2d978a94e9f5144ea57c170 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 1 Nov 2020 00:33:57 -0400 Subject: [PATCH] use file(GLOB) in cmake --- CMakeLists.txt | 77 +++++++++----------------------------------------- 1 file changed, 14 insertions(+), 63 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ec87a6..e658193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,70 +125,21 @@ if(mingw) link_libraries(ws2_32 wsock2) endif() -add_executable(abaddon - abaddon.hpp - util.hpp - settings.hpp - settings.cpp - abaddon.cpp - filecache.hpp - filecache.cpp - imgmanager.hpp - imgmanager.cpp - emojis.hpp - emojis.cpp - components/channels.hpp - components/channels.cpp - components/chatmessage.hpp - components/chatmessage.cpp - components/chatwindow.hpp - components/chatwindow.cpp - components/memberlist.hpp - components/memberlist.cpp - dialogs/confirm.hpp - dialogs/confirm.cpp - dialogs/editmessage.hpp - dialogs/editmessage.cpp - dialogs/joinguild.hpp - dialogs/joinguild.cpp - dialogs/token.hpp - dialogs/token.cpp - discord/discord.hpp - discord/discord.cpp - discord/http.hpp - discord/http.cpp - discord/objects.hpp - discord/objects.cpp - discord/store.hpp - discord/store.cpp - discord/websocket.hpp - discord/websocket.cpp - discord/user.hpp - discord/snowflake.hpp - discord/snowflake.cpp - discord/user.cpp - discord/json.hpp - discord/role.hpp - discord/role.cpp - discord/member.hpp - discord/member.cpp - discord/channel.hpp - discord/channel.cpp - discord/guild.hpp - discord/guild.cpp - discord/usersettings.hpp - discord/usersettings.cpp - discord/message.hpp - discord/message.cpp - discord/invite.hpp - discord/invite.cpp - discord/permissions.hpp - discord/permissions.cpp - discord/emoji.hpp - discord/emoji.cpp - windows/mainwindow.hpp - windows/mainwindow.cpp +file(GLOB ABADDON_SOURCES + "*.h" + "*.hpp" + "*.cpp" + "discord/*.hpp" + "discord/*.cpp" + "components/*.hpp" + "components/*.cpp" + "windows/*.hpp" + "windows/*.cpp" + "dialogs/*.hpp" + "dialogs/*.cpp" ) + +add_executable(abaddon ${ABADDON_SOURCES}) target_link_libraries(abaddon ${GTKMM_LIBRARIES}) target_link_libraries(abaddon ${GDKMM_LIBRARIES}) target_link_libraries(abaddon ${GLIBMM_LIBRARIES})