Skip to content

Commit

Permalink
[tgui] Update to 1.1.0 (#34972)
Browse files Browse the repository at this point in the history
* update to 1.1.0

* update version
  • Loading branch information
jimwang118 committed Nov 9, 2023
1 parent b5efc39 commit e642493
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 125 deletions.
52 changes: 33 additions & 19 deletions ports/tgui/devendor-stb.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
diff --git a/include/TGUI/extlibs/IncludeStbImage.hpp b/include/TGUI/extlibs/IncludeStbImage.hpp
index e19cccb..79d0f0c 100644
--- a/include/TGUI/extlibs/IncludeStbImage.hpp
+++ b/include/TGUI/extlibs/IncludeStbImage.hpp
@@ -64,7 +64,7 @@
#else
# define STB_IMAGE_STATIC
# define STB_IMAGE_IMPLEMENTATION
-# include <TGUI/extlibs/stb/stb_image.h>
+# include <stb_image.h>
#endif

#if defined(__GNUC__)
diff --git a/include/TGUI/extlibs/IncludeStbImageWrite.hpp b/include/TGUI/extlibs/IncludeStbImageWrite.hpp
index 2e23a5b..97ce878 100644
--- a/include/TGUI/extlibs/IncludeStbImageWrite.hpp
+++ b/include/TGUI/extlibs/IncludeStbImageWrite.hpp
@@ -52,7 +52,7 @@
#else
# define STB_IMAGE_WRITE_STATIC
# define STB_IMAGE_WRITE_IMPLEMENTATION
-# include <TGUI/extlibs/stb/stb_image_write.h>
+# include <stb_image_write.h>
#endif

#if defined(__GNUC__)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ebabb8a..4a166dc 100755
index 6a08458..c575036 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -173,6 +173,9 @@ else()
@@ -225,6 +225,10 @@ else()
set_target_properties(tgui PROPERTIES MINSIZEREL_POSTFIX -s)
set_target_properties(tgui PROPERTIES RELWITHDEBINFO_POSTFIX -s)
endif()

+find_path(STB_INCLUDE_DIR stb_image.h REQUIRED)
+target_include_directories(tgui PRIVATE "${STB_INCLUDE_DIR}")
+
# Add the backend files to the library.
# Without the ability to call target_link_libraries in a subdirectory (which was only added in CMake 3.13 in policy CMP0079),
# the code would be more complicated when using add_subdirectory. So we just avoid creating a new scope by using include.
diff --git a/src/Loading/ImageLoader.cpp b/src/Loading/ImageLoader.cpp
index e3ec9c5..d2f691d 100644
--- a/src/Loading/ImageLoader.cpp
+++ b/src/Loading/ImageLoader.cpp
@@ -45,7 +45,7 @@
#define STB_IMAGE_STATIC
#define STBI_WINDOWS_UTF8
#define STB_IMAGE_IMPLEMENTATION
-#include <TGUI/extlibs/stb/stb_image.h>
+#include <stb_image.h>
+find_path(TGUI_SYSTEM_STB_IMAGE_WRITE_INCLUDE_DIR stb_image_write.h REQUIRED)
+target_include_directories(tgui SYSTEM PRIVATE "${TGUI_SYSTEM_STB_IMAGE_WRITE_INCLUDE_DIR}")

#if defined(__GNUC__)
#pragma GCC diagnostic pop
if (TGUI_BUILD_AS_CXX_MODULE)
target_sources(tgui
100 changes: 0 additions & 100 deletions ports/tgui/fix-dependencies.patch

This file was deleted.

9 changes: 5 additions & 4 deletions ports/tgui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO texus/TGUI
REF v0.9.5
SHA512 68c02679598448440ffaad69ee606a8413c2bcb508c91a59c2997ac866681617dadf6b9688f6c5eb07e5e38b5094a39bd79f0753a82236ec5f48498797c11134
HEAD_REF 0.10
REF "v${VERSION}"
SHA512 0896551286a40ea5b6e778018473bd230c7c3052cf19cbecfdc00789f029e9a753e569fdd5aab6f2e1e74c5fb8873bf1f7389e66abeaa3d628d6032941af331e
HEAD_REF 1.x
PATCHES
fix-dependencies.patch
devendor-stb.patch
)

Expand Down Expand Up @@ -50,6 +49,8 @@ vcpkg_cmake_configure(
-DTGUI_BUILD_GUI_BUILDER=OFF
MAYBE_UNUSED_VARIABLES
TGUI_BUILD_FRAMEWORK
TGUI_HAS_BACKEND_SDL
TGUI_HAS_BACKEND_SFML
)

vcpkg_cmake_install()
Expand Down
2 changes: 1 addition & 1 deletion ports/tgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tgui",
"version": "0.9.5",
"version": "1.1.0",
"description": "TGUI is an easy to use, cross-platform, C++ GUI for SFML.",
"homepage": "https://tgui.eu",
"license": "Zlib",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8317,7 +8317,7 @@
"port-version": 4
},
"tgui": {
"baseline": "0.9.5",
"baseline": "1.1.0",
"port-version": 0
},
"theia": {
Expand Down
5 changes: 5 additions & 0 deletions versions/t-/tgui.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dd583943a94fda26c0fe58b498ebc8675af7e831",
"version": "1.1.0",
"port-version": 0
},
{
"git-tree": "99b11d7e5b91a6f1919402576952f951383e2c34",
"version": "0.9.5",
Expand Down

0 comments on commit e642493

Please sign in to comment.