Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Danielsson <max@autious.net>2022-04-28 11:20:37 +0300
committerGitHub <noreply@github.com>2022-04-28 11:20:37 +0300
commitc34b5bbc73d1abcc5c400decb526ae7050f40771 (patch)
treedda10ac693a0fe7021380e2ac79bea7c3f7f1a1e
parent0c768d1b08fcccad8bad6e3bb72554c1e570228b (diff)
parent31992081859be8f7c76e32e5706019aad46dc5a1 (diff)
Merge pull request #40 from feliwir/imgui-lib
Statically link imgui
-rw-r--r--Projects/CMakeLists.txt22
-rw-r--r--Source/GUI/dimgui/dimgui_impl.cpp35
2 files changed, 21 insertions, 36 deletions
diff --git a/Projects/CMakeLists.txt b/Projects/CMakeLists.txt
index 3d67dc82..9bbacc53 100644
--- a/Projects/CMakeLists.txt
+++ b/Projects/CMakeLists.txt
@@ -640,6 +640,7 @@ ADD_DEFINITIONS(
-DHAVE_MIXCFG_H
-DGLEW_STATIC
-DTIXML_USE_STL
+ -DIMGUI_ENABLE_FREETYPE
)
INCLUDE_DIRECTORIES(SYSTEM
@@ -765,6 +766,24 @@ if(APPLE)
ENDIF()
+SET(IMGUI_SRCS
+ ${LIBDIR}/imgui-1.85/imgui.cpp
+ ${LIBDIR}/imgui-1.85/imgui_demo.cpp
+ ${LIBDIR}/imgui-1.85/imgui_draw.cpp
+ ${LIBDIR}/imgui-1.85/imgui_widgets.cpp
+ ${LIBDIR}/imgui-1.85/imgui_tables.cpp
+ ${LIBDIR}/imgui-1.85/imgui_color_picker.cpp
+ ${LIBDIR}/imgui-1.85/implot.cpp
+ ${LIBDIR}/imgui-1.85/implot_items.cpp
+ ${LIBDIR}/imgui-1.85/misc/freetype/imgui_freetype.cpp
+)
+
+ADD_LIBRARY( imgui STATIC
+ ${IMGUI_SRCS}
+)
+
+SET_PROPERTY(TARGET imgui PROPERTY FOLDER "Support")
+
FILE(GLOB TINYXML_SRCS
${LIBDIR}/tinyxml/tinystr.cpp
${LIBDIR}/tinyxml/tinyxml.cpp
@@ -774,7 +793,6 @@ FILE(GLOB TINYXML_SRCS
${LIBDIR}/tinyxml/tinyxml.h
)
-
ADD_LIBRARY( tinyxml STATIC
${TINYXML_SRCS}
)
@@ -1207,6 +1225,7 @@ LIST(APPEND OVERGROWTH_SRCS
)
SOURCE_GROUP(Internal FILES ${OVERGROWTH_INTERNAL_SRCS})
+SOURCE_GROUP(ImGui FILES ${IMGUI_SRCS})
SOURCE_GROUP(TinyXML FILES ${TINYXML_SRCS})
SOURCE_GROUP(Logging FILES ${LOGGING_SRCS})
@@ -1539,6 +1558,7 @@ IF(BUILD_OVERGROWTH)
freeimage
triangle
angelscript
+ imgui
tinyxml
trex
logging
diff --git a/Source/GUI/dimgui/dimgui_impl.cpp b/Source/GUI/dimgui/dimgui_impl.cpp
deleted file mode 100644
index 849e0875..00000000
--- a/Source/GUI/dimgui/dimgui_impl.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-//-----------------------------------------------------------------------------
-// Name: dimgui_impl.cpp
-// Developer: Wolfire Games LLC
-// Description: This is the implementation file for Dear IMGUI, this is where
-// all the code in the project gets compiled for use in the
-// project.
-// License: Read below
-//-----------------------------------------------------------------------------
-//
-//
-// Copyright 2022 Wolfire Games LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-//-----------------------------------------------------------------------------
-#define IMGUI_ENABLE_FREETYPE
-#include <imgui.cpp>
-#include <imgui_demo.cpp>
-#include <imgui_draw.cpp>
-#include <imgui_widgets.cpp>
-#include <imgui_tables.cpp>
-#include <imgui_color_picker.cpp>
-#include <implot.cpp>
-#include <implot_items.cpp>
-#include <imgui_freetype.cpp> \ No newline at end of file