[imgui-sfml] update to v2.3 (#20926)

* [imgui-sfml] update to v2.3

* update version

* change patch format from CRLF to CF

* update version

* Finish suggested change

* update version
This commit is contained in:
JonLiu1993 2021-10-27 14:43:45 +08:00 committed by GitHub
parent fa14828340
commit aa105d94e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 41 deletions

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53500fd..cb98701 100644 index 3a974c4..8a1c6cd 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -35,34 +35,14 @@ if (IMGUI_SFML_FIND_SFML) @@ -41,34 +41,14 @@ if (IMGUI_SFML_FIND_SFML)
if (NOT BUILD_SHARED_LIBS) if (NOT BUILD_SHARED_LIBS)
set(SFML_STATIC_LIBRARIES ON) set(SFML_STATIC_LIBRARIES ON)
endif() endif()
@ -23,7 +23,7 @@ index 53500fd..cb98701 100644
-endif() -endif()
- -
-# This uses FindImGui.cmake provided in ImGui-SFML repo for now -# This uses FindImGui.cmake provided in ImGui-SFML repo for now
-find_package(ImGui 1.68 REQUIRED) -find_package(ImGui 1.80 REQUIRED)
- -
-# these headers will be installed alongside ImGui-SFML -# these headers will be installed alongside ImGui-SFML
-set(IMGUI_PUBLIC_HEADERS -set(IMGUI_PUBLIC_HEADERS
@ -37,9 +37,9 @@ index 53500fd..cb98701 100644
-) -)
+find_package(imgui CONFIG REQUIRED) +find_package(imgui CONFIG REQUIRED)
# CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL just because it's safer if (IMGUI_SFML_IMGUI_DEMO)
# (unless the OpenGL_GL_PREFERENCE was explicitly set) list(APPEND IMGUI_SOURCES ${IMGUI_DEMO_SOURCES})
@@ -82,7 +62,7 @@ add_library(ImGui-SFML @@ -92,7 +72,7 @@ add_library(ImGui-SFML
add_library(ImGui-SFML::ImGui-SFML ALIAS ImGui-SFML) add_library(ImGui-SFML::ImGui-SFML ALIAS ImGui-SFML)
target_link_libraries(ImGui-SFML target_link_libraries(ImGui-SFML

View File

@ -1,11 +1,10 @@
diff --git a/imconfig-SFML.h b/imconfig-SFML.h diff --git a/imconfig-SFML.h b/imconfig-SFML.h
index f66ba20..0f43ce6 100644 index ddfe05d..4e7634e 100644
--- a/imconfig-SFML.h --- a/imconfig-SFML.h
+++ b/imconfig-SFML.h +++ b/imconfig-SFML.h
@@ -28,5 +28,3 @@ @@ -23,5 +23,3 @@
static_cast<sf::Uint8>(z * 255.f), \ return sf::Color(static_cast<sf::Uint8>(x * 255.f), static_cast<sf::Uint8>(y * 255.f), \
static_cast<sf::Uint8>(w * 255.f)); \ static_cast<sf::Uint8>(z * 255.f), static_cast<sf::Uint8>(w * 255.f)); \
} }
- -
-#define ImTextureID unsigned int -#define ImTextureID unsigned int
\ No newline at end of file

View File

@ -1,13 +0,0 @@
diff --git a/imconfig-SFML.h b/imconfig-SFML.h
index 0f43ce6..1fce2c1 100644
--- a/imconfig-SFML.h
+++ b/imconfig-SFML.h
@@ -19,7 +19,7 @@
#define IM_VEC4_CLASS_EXTRA \
ImVec4(const sf::Color & c) \
- : ImVec4(c.r / 255.f, c.g / 255.f, c.b / 255.f, c.a / 255.f) { \
+ : x(c.r / 255.f), y(c.g / 255.f), z(c.b / 255.f), w(c.a / 255.f) { \
} \
operator sf::Color() const { \
return sf::Color( \

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d7a3fa..614564f 100644 index 8a1c6cd..7156f51 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -32,9 +32,6 @@ set(IMGUI_SFML_CONFIG_INSTALL_DIR "" CACHE PATH "Path where user's config header @@ -38,9 +38,6 @@ set(IMGUI_SFML_CONFIG_INSTALL_DIR "" CACHE PATH "Path where user's config header
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
if (IMGUI_SFML_FIND_SFML) if (IMGUI_SFML_FIND_SFML)

View File

@ -3,25 +3,23 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO eliasdaler/imgui-sfml REPO eliasdaler/imgui-sfml
REF v2.1 REF 82dc2033e51b8323857c3ae1cf1f458b3a933c35 #v2.3
SHA512 134c49e9c57bc4d3882d99a52ec87f74c11d2f3134501c79b20bce4612f315f2e3f33a521597b387ca8f91942cf2b82ec9f4a8b1672a700e7233a9758897b6d0 SHA512 f27a0e65aa20229c73b27c4232269908dfeb5d78b1cef7299a179ecac6194d9829e148e95ed54b4500ffd36ada09fdbfadf67588c78bee87aff446ae80347bcf
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0001-fix_find_package.patch 0001-fix_find_package.patch
0002-fix_imgui_config.patch 0002-fix_imgui_config.patch
0003-fix_osx.patch
004-fix-find-sfml.patch 004-fix-find-sfml.patch
) )
vcpkg_configure_cmake( vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
) )
vcpkg_install_cmake() vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ImGui-SFML) vcpkg_cmake_config_fixup(PACKAGE_NAME ImGui-SFML CONFIG_PATH lib/cmake/ImGui-SFML)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,12 +1,19 @@
{ {
"name": "imgui-sfml", "name": "imgui-sfml",
"version-string": "2.1", "version": "2.3",
"port-version": 3,
"description": "ImGui binding for use with SFML", "description": "ImGui binding for use with SFML",
"homepage": "https://github.com/eliasdaler/imgui-sfml", "homepage": "https://github.com/eliasdaler/imgui-sfml",
"dependencies": [ "dependencies": [
"imgui", "imgui",
"opengl", "opengl",
"sfml" "sfml",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
] ]
} }

View File

@ -2813,8 +2813,8 @@
"port-version": 0 "port-version": 0
}, },
"imgui-sfml": { "imgui-sfml": {
"baseline": "2.1", "baseline": "2.3",
"port-version": 3 "port-version": 0
}, },
"imguizmo": { "imguizmo": {
"baseline": "1.83", "baseline": "1.83",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "2ece5bd925368d6ef9b7295b31f7f2de86179f4e",
"version": "2.3",
"port-version": 0
},
{ {
"git-tree": "57e3ab9f08cd10a7d66717044636c02349ee2ea3", "git-tree": "57e3ab9f08cd10a7d66717044636c02349ee2ea3",
"version-string": "2.1", "version-string": "2.1",