From c7fe85413a3eef00e3a5305acfde9a452e9bc017 Mon Sep 17 00:00:00 2001 From: blankie Date: Wed, 22 Feb 2023 16:09:33 +0700 Subject: [PATCH] Use full paths to imgui files in includes --- .gitmodules | 2 +- CMakeLists.txt | 13 +++++++------ event_loop.cpp | 2 +- event_loop.h | 2 +- fragments/filters.cpp | 4 ++-- fragments/ok_buttons_fragment.h | 2 +- group_panel.cpp | 4 ++-- group_panel.h | 2 +- main.cpp | 6 +++--- misc.cpp | 4 ++-- misc.h | 2 +- imgui => thirdparty/imgui | 0 windows/debug.cpp | 2 +- windows/exclusions.cpp | 2 +- windows/filters.cpp | 2 +- windows/logs.cpp | 2 +- windows/logs.h | 2 +- windows/main.cpp | 2 +- windows/main.h | 2 +- windows/settings.cpp | 4 ++-- 20 files changed, 31 insertions(+), 30 deletions(-) rename imgui => thirdparty/imgui (100%) diff --git a/.gitmodules b/.gitmodules index e3ede80..d62d5b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "imgui"] - path = imgui + path = thirdparty/imgui url = https://github.com/ocornut/imgui.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ccd1a9a..87a5897 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,17 +21,18 @@ set(INCLUDES "") set(SOURCES "") set(IMGUI_SOURCES "") set(DEFINITIONS "") -list(APPEND INCLUDES imgui imgui/backends imgui/misc/cpp imgui/freetype /usr/include/SDL2) +# imgui include because +list(APPEND INCLUDES thirdparty thirdparty/imgui /usr/include/SDL2) list(APPEND SOURCES main.cpp event_loop.cpp logcat_thread.cpp logcat_entry.cpp log.cpp config.cpp filters.cpp misc.cpp pcre2_wrapper.cpp group_panel.cpp fragments/filters.cpp windows/logs.cpp windows/settings.cpp windows/filters.cpp windows/exclusions.cpp windows/main.cpp) -list(APPEND IMGUI_SOURCES imgui/imgui.cpp imgui/imgui_draw.cpp imgui/imgui_widgets.cpp imgui/imgui_tables.cpp - imgui/misc/cpp/imgui_stdlib.cpp imgui/misc/freetype/imgui_freetype.cpp - imgui/backends/imgui_impl_sdl2.cpp imgui/backends/imgui_impl_opengl3.cpp) -list(APPEND DEFINITIONS -DIMGUI_USER_CONFIG="../myimconfig.h") +list(APPEND IMGUI_SOURCES thirdparty/imgui/imgui.cpp thirdparty/imgui/imgui_draw.cpp thirdparty/imgui/imgui_widgets.cpp thirdparty/imgui/imgui_tables.cpp + thirdparty/imgui/misc/cpp/imgui_stdlib.cpp thirdparty/imgui/misc/freetype/imgui_freetype.cpp + thirdparty/imgui/backends/imgui_impl_sdl2.cpp thirdparty/imgui/backends/imgui_impl_opengl3.cpp) +list(APPEND DEFINITIONS -DIMGUI_USER_CONFIG="../../myimconfig.h") if (CMAKE_BUILD_TYPE MATCHES "Debug") list(APPEND SOURCES windows/debug.cpp) - list(APPEND IMGUI_SOURCES imgui/imgui_demo.cpp) + list(APPEND IMGUI_SOURCES thirdparty/imgui/imgui_demo.cpp) if (NOT FLAGS) list(APPEND FLAGS -fsanitize=undefined,thread) endif() diff --git a/event_loop.cpp b/event_loop.cpp index cb4e2da..679daac 100644 --- a/event_loop.cpp +++ b/event_loop.cpp @@ -1,4 +1,4 @@ -#include +#include #include "log.h" #include "config.h" diff --git a/event_loop.h b/event_loop.h index 68b3e08..ee1dcf9 100644 --- a/event_loop.h +++ b/event_loop.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "config.h" #include "logcat_thread.h" diff --git a/fragments/filters.cpp b/fragments/filters.cpp index 5b128e6..ef59b82 100644 --- a/fragments/filters.cpp +++ b/fragments/filters.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "../group_panel.h" #include "../filters.h" diff --git a/fragments/ok_buttons_fragment.h b/fragments/ok_buttons_fragment.h index 594a250..119a0d9 100644 --- a/fragments/ok_buttons_fragment.h +++ b/fragments/ok_buttons_fragment.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "../misc.h" void ok_buttons_fragment(bool* p_open, auto ok, auto apply); diff --git a/group_panel.cpp b/group_panel.cpp index ce48c2c..e151f11 100644 --- a/group_panel.cpp +++ b/group_panel.cpp @@ -1,6 +1,6 @@ #define IMGUI_DEFINE_MATH_OPERATORS -#include -#include +#include +#include #include "group_panel.h" // The following code is slightly modified public domain code from https://github.com/thedmd diff --git a/group_panel.h b/group_panel.h index 13e57af..b5f2a4b 100644 --- a/group_panel.h +++ b/group_panel.h @@ -1,6 +1,6 @@ #pragma once -#include +#include // The following code is slightly modified public domain code from https://github.com/thedmd // All modifications have an inline comment with "[CUSTOM]" diff --git a/main.cpp b/main.cpp index 0129025..023b161 100644 --- a/main.cpp +++ b/main.cpp @@ -3,9 +3,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #if defined(IMGUI_IMPL_OPENGL_ES2) #include diff --git a/misc.cpp b/misc.cpp index bff96be..43b1a5f 100644 --- a/misc.cpp +++ b/misc.cpp @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include #include "misc.h" diff --git a/misc.h b/misc.h index da4a104..b4eca48 100644 --- a/misc.h +++ b/misc.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include std::string quote(const std::string& str); void throw_system_error(int err, const char* what); diff --git a/imgui b/thirdparty/imgui similarity index 100% rename from imgui rename to thirdparty/imgui diff --git a/windows/debug.cpp b/windows/debug.cpp index a8a073a..2f0dcf8 100644 --- a/windows/debug.cpp +++ b/windows/debug.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../myimconfig.h" #include "../log.h" diff --git a/windows/exclusions.cpp b/windows/exclusions.cpp index b6c0157..8d8daa7 100644 --- a/windows/exclusions.cpp +++ b/windows/exclusions.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../misc.h" #include "../fragments/filters.h" diff --git a/windows/filters.cpp b/windows/filters.cpp index 4d75888..5a87411 100644 --- a/windows/filters.cpp +++ b/windows/filters.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../misc.h" #include "../fragments/filters.h" diff --git a/windows/logs.cpp b/windows/logs.cpp index 7a9c62e..6b1d585 100644 --- a/windows/logs.cpp +++ b/windows/logs.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "../misc.h" #include "../log.h" diff --git a/windows/logs.h b/windows/logs.h index dde1776..085efec 100644 --- a/windows/logs.h +++ b/windows/logs.h @@ -1,5 +1,5 @@ #pragma once -#include +#include void logs_window(ImFont* monospace_font, bool* __restrict autoscrolling, bool* __restrict p_open); diff --git a/windows/main.cpp b/windows/main.cpp index b4f8b78..9ec8b3e 100644 --- a/windows/main.cpp +++ b/windows/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/windows/main.h b/windows/main.h index 6fcd2c9..0472601 100644 --- a/windows/main.h +++ b/windows/main.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "../config.h" diff --git a/windows/settings.cpp b/windows/settings.cpp index a177e3f..851e778 100644 --- a/windows/settings.cpp +++ b/windows/settings.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "../misc.h" #include "../config.h"