diff --git a/ports/imgui-sfml/0001-fix_find_package.patch b/ports/imgui-sfml/0001-fix_find_package.patch index ace8e9ee421f6a..df35da429b285b 100644 --- a/ports/imgui-sfml/0001-fix_find_package.patch +++ b/ports/imgui-sfml/0001-fix_find_package.patch @@ -1,37 +1,39 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 075d793..9bc635a 100644 +index 7945482..1c91277 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -41,13 +41,14 @@ if (IMGUI_SFML_FIND_SFML) - if (NOT BUILD_SHARED_LIBS) - set(SFML_STATIC_LIBRARIES ON) - endif() -- find_package(SFML 2.5 COMPONENTS graphics system window) -+ find_package(SFML COMPONENTS graphics system window) - - if(NOT SFML_FOUND) - message(FATAL_ERROR "SFML 2 directory not found. Set SFML_DIR to directory where SFML was built (or one which contains SFMLConfig.cmake)") - endif() - endif() - -+if(0) - # ImGui does not provide native support for CMakeLists, workaround for now to have - # users specify IMGUI_DIR. Waiting for this PR to get merged... - # https://github.com/ocornut/imgui/pull/1713 -@@ -69,6 +70,8 @@ set(IMGUI_PUBLIC_HEADERS - ${IMGUI_INCLUDE_DIR}/imstb_truetype.h - ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.h - ) -+endif() -+find_package(imgui CONFIG REQUIRED) - - if (IMGUI_SFML_IMGUI_DEMO) - list(APPEND IMGUI_SOURCES ${IMGUI_DEMO_SOURCES}) -@@ -93,6 +96,7 @@ add_library(ImGui-SFML::ImGui-SFML ALIAS ImGui-SFML) - - target_link_libraries(ImGui-SFML - PUBLIC -+ imgui::imgui - sfml-graphics - sfml-system - sfml-window +@@ -29,16 +29,7 @@ if(IMGUI_SFML_FIND_SFML) + find_package(SFML 3 REQUIRED COMPONENTS Graphics) + endif() + +-# ImGui does not provide native support for CMakeLists, workaround for now to have +-# users specify IMGUI_DIR. Waiting for this PR to get merged... +-# https://github.com/ocornut/imgui/pull/1713 +-if(NOT IMGUI_DIR) +- set(IMGUI_DIR "" CACHE PATH "imgui top-level directory") +- message(FATAL_ERROR "ImGui directory not found. Set IMGUI_DIR to imgui's top-level path (containing 'imgui.h' and other files).\n") +-endif() +- +-# This uses FindImGui.cmake provided in ImGui-SFML repo for now +-find_package(ImGui 1.91.1 REQUIRED) ++find_package(ImGui CONFIG REQUIRED) + + # These headers will be installed alongside ImGui-SFML + set(IMGUI_PUBLIC_HEADERS +@@ -70,7 +61,7 @@ target_include_directories(ImGui-SFML PUBLIC + $ + $ + ) +-target_link_libraries(ImGui-SFML PUBLIC SFML::Graphics OpenGL::GL) ++target_link_libraries(ImGui-SFML PUBLIC imgui::imgui SFML::Graphics OpenGL::GL) + if(WIN32 AND MINGW) + target_link_libraries(ImGui-SFML PUBLIC imm32) + endif() +@@ -113,7 +104,6 @@ target_compile_definitions(ImGui-SFML PUBLIC IMGUI_USER_CONFIG="${IMGUI_SFML_CON + set(IMGUI_SFML_PUBLIC_HEADERS + ${PROJECT_SOURCE_DIR}/imgui-SFML.h + ${PROJECT_SOURCE_DIR}/imgui-SFML_export.h +- ${IMGUI_PUBLIC_HEADERS} + ) + if(IMGUI_SFML_USE_DEFAULT_CONFIG OR (NOT DEFINED "${IMGUI_SFML_CONFIG_INSTALL_DIR}")) + list(APPEND IMGUI_SFML_PUBLIC_HEADERS "${IMGUI_SFML_CONFIG_DIR}/${IMGUI_SFML_CONFIG_NAME}") diff --git a/ports/imgui-sfml/0002-clean-deprecated-api.patch b/ports/imgui-sfml/0002-clean-deprecated-api.patch deleted file mode 100644 index 24be56024af92c..00000000000000 --- a/ports/imgui-sfml/0002-clean-deprecated-api.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp -index d9c4f52..6ae99c1 100644 ---- a/imgui-SFML.cpp -+++ b/imgui-SFML.cpp -@@ -867,36 +867,9 @@ void SetJoystickRTriggerThreshold(float threshold) { - - void SetJoystickMapping(int key, unsigned int joystickButton) { - assert(s_currWindowCtx); -- // This function now expects ImGuiKey_* values. -- // For partial backwards compatibility, also expect some ImGuiNavInput_* values. -- ImGuiKey finalKey; -- switch (key) { -- case ImGuiNavInput_Activate: -- finalKey = ImGuiKey_GamepadFaceDown; -- break; -- case ImGuiNavInput_Cancel: -- finalKey = ImGuiKey_GamepadFaceRight; -- break; -- case ImGuiNavInput_Input: -- finalKey = ImGuiKey_GamepadFaceUp; -- break; -- case ImGuiNavInput_Menu: -- finalKey = ImGuiKey_GamepadFaceLeft; -- break; -- case ImGuiNavInput_FocusPrev: -- case ImGuiNavInput_TweakSlow: -- finalKey = ImGuiKey_GamepadL1; -- break; -- case ImGuiNavInput_FocusNext: -- case ImGuiNavInput_TweakFast: -- finalKey = ImGuiKey_GamepadR1; -- break; -- default: -- assert(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END); -- finalKey = static_cast(key); -- } -+ assert(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END); - assert(joystickButton < sf::Joystick::ButtonCount); -- s_currWindowCtx->joystickMapping[joystickButton] = finalKey; -+ s_currWindowCtx->joystickMapping[joystickButton] = static_cast(key); - } - - void SetDPadXAxis(sf::Joystick::Axis dPadXAxis, bool inverted) { -@@ -1228,11 +1201,11 @@ void RenderDrawLists(ImDrawData* draw_data) { - const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data; - const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data; - glVertexPointer(2, GL_FLOAT, sizeof(ImDrawVert), -- (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, pos))); -+ (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, pos))); - glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert), -- (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, uv))); -+ (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, uv))); - glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), -- (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, col))); -+ (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, col))); - - for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) { - const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i]; diff --git a/ports/imgui-sfml/0003-use-explicit-id.patch b/ports/imgui-sfml/0003-use-explicit-id.patch deleted file mode 100644 index cd5c5e83566f22..00000000000000 --- a/ports/imgui-sfml/0003-use-explicit-id.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp -index 6ae99c1..069fdeb 100644 ---- a/imgui-SFML.cpp -+++ b/imgui-SFML.cpp -@@ -984,49 +984,30 @@ void Image(const sf::Sprite& sprite, const sf::Vector2f& size, const sf::Color& - - /////////////// Image Button Overloads for sf::Texture - --bool ImageButton(const sf::Texture& texture, const int framePadding, const sf::Color& bgColor, -- const sf::Color& tintColor) { -- return ImageButton(texture, static_cast(texture.getSize()), framePadding, bgColor, -- tintColor); --} -- --bool ImageButton(const sf::Texture& texture, const sf::Vector2f& size, const int framePadding, -+bool ImageButton(const char* id, const sf::Texture& texture, const sf::Vector2f& size, - const sf::Color& bgColor, const sf::Color& tintColor) { - ImTextureID textureID = convertGLTextureHandleToImTextureID(texture.getNativeHandle()); - -- return ImGui::ImageButton(textureID, ImVec2(size.x, size.y), ImVec2(0, 0), ImVec2(1, 1), -- framePadding, toImColor(bgColor), toImColor(tintColor)); -+ return ImGui::ImageButton(id, textureID, ImVec2(size.x, size.y), ImVec2(0, 0), ImVec2(1, 1), -+ toImColor(bgColor), toImColor(tintColor)); - } - - /////////////// Image Button Overloads for sf::RenderTexture - --bool ImageButton(const sf::RenderTexture& texture, const int framePadding, const sf::Color& bgColor, -- const sf::Color& tintColor) { -- return ImageButton(texture, static_cast(texture.getSize()), framePadding, bgColor, -- tintColor); --} -- --bool ImageButton(const sf::RenderTexture& texture, const sf::Vector2f& size, const int framePadding, -+bool ImageButton(const char* id, const sf::RenderTexture& texture, const sf::Vector2f& size, - const sf::Color& bgColor, const sf::Color& tintColor) { - ImTextureID textureID = - convertGLTextureHandleToImTextureID(texture.getTexture().getNativeHandle()); - -- return ImGui::ImageButton(textureID, ImVec2(size.x, size.y), ImVec2(0, 1), -+ return ImGui::ImageButton(id, textureID, ImVec2(size.x, size.y), ImVec2(0, 1), - ImVec2(1, 0), // flipped vertically, because textures in - // sf::RenderTexture are stored this way -- framePadding, toImColor(bgColor), toImColor(tintColor)); -+ toImColor(bgColor), toImColor(tintColor)); - } - - /////////////// Image Button Overloads for sf::Sprite - --bool ImageButton(const sf::Sprite& sprite, const int framePadding, const sf::Color& bgColor, -- const sf::Color& tintColor) { -- sf::FloatRect spriteSize = sprite.getGlobalBounds(); -- return ImageButton(sprite, sf::Vector2f(spriteSize.width, spriteSize.height), framePadding, -- bgColor, tintColor); --} -- --bool ImageButton(const sf::Sprite& sprite, const sf::Vector2f& size, const int framePadding, -+bool ImageButton(const char* id, const sf::Sprite& sprite, const sf::Vector2f& size, - const sf::Color& bgColor, const sf::Color& tintColor) { - #if SFML_VERSION_MAJOR >= 3 - const sf::Texture& texture = sprite.getTexture(); -@@ -1045,8 +1026,8 @@ bool ImageButton(const sf::Sprite& sprite, const sf::Vector2f& size, const int f - (textureRect.top + textureRect.height) / textureSize.y); - - ImTextureID textureID = convertGLTextureHandleToImTextureID(texture.getNativeHandle()); -- return ImGui::ImageButton(textureID, ImVec2(size.x, size.y), uv0, uv1, framePadding, -- toImColor(bgColor), toImColor(tintColor)); -+ return ImGui::ImageButton(id, textureID, ImVec2(size.x, size.y), uv0, uv1, toImColor(bgColor), -+ toImColor(tintColor)); - } - - /////////////// Draw_list Overloads -diff --git a/imgui-SFML.h b/imgui-SFML.h -index e431e99..8cce4d6 100644 ---- a/imgui-SFML.h -+++ b/imgui-SFML.h -@@ -99,29 +99,19 @@ IMGUI_SFML_API void Image(const sf::Sprite& sprite, const sf::Vector2f& size, - const sf::Color& borderColor = sf::Color::Transparent); - - // ImageButton overloads for sf::Texture --IMGUI_SFML_API bool ImageButton(const sf::Texture& texture, const int framePadding = -1, -- const sf::Color& bgColor = sf::Color::Transparent, -- const sf::Color& tintColor = sf::Color::White); --IMGUI_SFML_API bool ImageButton(const sf::Texture& texture, const sf::Vector2f& size, -- const int framePadding = -1, -+IMGUI_SFML_API bool ImageButton(const char* id, const sf::Texture& texture, -+ const sf::Vector2f& size, - const sf::Color& bgColor = sf::Color::Transparent, - const sf::Color& tintColor = sf::Color::White); - - // ImageButton overloads for sf::RenderTexture --IMGUI_SFML_API bool ImageButton(const sf::RenderTexture& texture, const int framePadding = -1, -- const sf::Color& bgColor = sf::Color::Transparent, -- const sf::Color& tintColor = sf::Color::White); --IMGUI_SFML_API bool ImageButton(const sf::RenderTexture& texture, const sf::Vector2f& size, -- const int framePadding = -1, -+IMGUI_SFML_API bool ImageButton(const char* id, const sf::RenderTexture& texture, -+ const sf::Vector2f& size, - const sf::Color& bgColor = sf::Color::Transparent, - const sf::Color& tintColor = sf::Color::White); - - // ImageButton overloads for sf::Sprite --IMGUI_SFML_API bool ImageButton(const sf::Sprite& sprite, const int framePadding = -1, -- const sf::Color& bgColor = sf::Color::Transparent, -- const sf::Color& tintColor = sf::Color::White); --IMGUI_SFML_API bool ImageButton(const sf::Sprite& sprite, const sf::Vector2f& size, -- const int framePadding = -1, -+IMGUI_SFML_API bool ImageButton(const char* id, const sf::Sprite& sprite, const sf::Vector2f& size, - const sf::Color& bgColor = sf::Color::Transparent, - const sf::Color& tintColor = sf::Color::White); - diff --git a/ports/imgui-sfml/portfile.cmake b/ports/imgui-sfml/portfile.cmake index 8b60d33fb01b99..f5939f4da7565e 100644 --- a/ports/imgui-sfml/portfile.cmake +++ b/ports/imgui-sfml/portfile.cmake @@ -1,21 +1,17 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO eliasdaler/imgui-sfml + REPO sfml/imgui-sfml REF "v${VERSION}" - SHA512 c8f2ed21ad5dfac417474f0caed1c59105b7dd8bf2dcb1db3b1f46a4fb07cec3c199d6fda0ff05ec5040a18000a0168f1a8caa978dee356c2b6874b5b2e10ec4 + SHA512 be02207533b532f10038bb83eb49311e57774dbddd1bac2ebb1789cbdef2abbfa24cee59b8b5889302feba72af1e98a4a1c7ac063e7d815ce1f2ef9bd40cf552 HEAD_REF master PATCHES 0001-fix_find_package.patch - 0002-clean-deprecated-api.patch # see https://github.com/SFML/imgui-sfml/pull/305 - 0003-use-explicit-id.patch # see https://github.com/SFML/imgui-sfml/pull/266 ) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DCMAKE_CXX_STANDARD=11 + -DCMAKE_CXX_STANDARD=17 ) vcpkg_cmake_install() vcpkg_copy_pdbs() @@ -25,7 +21,7 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/imgui-sfml/ImGui-SFMLConfig.cmake" cmak string(PREPEND cmake_config [[ include(CMakeFindDependencyMacro) find_dependency(imgui CONFIG) -find_dependency(SFML COMPONENTS graphics system window) +find_dependency(SFML COMPONENTS Graphics Window System) ]]) file(WRITE "${CURRENT_PACKAGES_DIR}/share/imgui-sfml/ImGui-SFMLConfig.cmake" "${cmake_config}") diff --git a/ports/imgui-sfml/vcpkg.json b/ports/imgui-sfml/vcpkg.json index 4b20359b14bf08..e2540d1ac26038 100644 --- a/ports/imgui-sfml/vcpkg.json +++ b/ports/imgui-sfml/vcpkg.json @@ -1,7 +1,6 @@ { "name": "imgui-sfml", - "version": "2.6", - "port-version": 1, + "version": "3.0", "description": "ImGui binding for use with SFML", "homepage": "https://github.com/eliasdaler/imgui-sfml", "license": "MIT", diff --git a/ports/sfml/fix-dep-openal.patch b/ports/sfml/fix-dep-openal.patch deleted file mode 100644 index 9cb4369d2c3080..00000000000000 --- a/ports/sfml/fix-dep-openal.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in -index ef96827..864b32e 100644 ---- a/cmake/SFMLConfigDependencies.cmake.in -+++ b/cmake/SFMLConfigDependencies.cmake.in -@@ -75,6 +75,8 @@ if(SFML_STATIC_LIBRARIES) - # sfml-audio - list(FIND SFML_FIND_COMPONENTS "audio" FIND_SFML_AUDIO_COMPONENT_INDEX) - if(FIND_SFML_AUDIO_COMPONENT_INDEX GREATER -1) -+ find_dependency(OpenAL) -+ set(OpenAL_LIB OpenAL::OpenAL) - sfml_bind_dependency(TARGET OpenAL FRIENDLY_NAME "OpenAL" SEARCH_NAMES "OpenAL" "openal" "openal32") - if (NOT FIND_SFML_OS_IOS) - sfml_bind_dependency(TARGET VORBIS FRIENDLY_NAME "VorbisFile" SEARCH_NAMES "vorbisfile") -diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt -index 8158365..3ebaf90 100644 ---- a/src/SFML/Audio/CMakeLists.txt -+++ b/src/SFML/Audio/CMakeLists.txt -@@ -68,7 +68,9 @@ elseif(SFML_OS_ANDROID) - endif() - - # find external libraries --find_package(OpenAL REQUIRED) -+find_package(OpenAL CONFIG REQUIRED) -+set(OpenAL_LIB OpenAL::OpenAL) -+sfml_find_package(OpenAL LINK OpenAL_LIB) - sfml_find_package(VORBIS INCLUDE "VORBIS_INCLUDE_DIRS" LINK "VORBIS_LIBRARIES") - sfml_find_package(FLAC INCLUDE "FLAC_INCLUDE_DIR" LINK "FLAC_LIBRARY") - diff --git a/ports/sfml/fix-dependencies.patch b/ports/sfml/fix-dependencies.patch deleted file mode 100644 index eb3a8dc68f911d..00000000000000 --- a/ports/sfml/fix-dependencies.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff --git a/cmake/SFMLConfig.cmake.in b/cmake/SFMLConfig.cmake.in -index 30194c5f..40b72309 100644 ---- a/cmake/SFMLConfig.cmake.in -+++ b/cmake/SFMLConfig.cmake.in -@@ -1,3 +1,8 @@ -+set(SFML_STATIC_LIBRARIES false) -+if(NOT "@BUILD_SHARED_LIBS@") -+ set(SFML_STATIC_LIBRARIES true) -+endif() -+include(CMakeFindDependencyMacro) - # This script provides the SFML libraries as imported targets - # ------------------------------------ - # -diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in -index 0737ec5d..05bf9a8f 100644 ---- a/cmake/SFMLConfigDependencies.cmake.in -+++ b/cmake/SFMLConfigDependencies.cmake.in -@@ -35,9 +35,11 @@ if(SFML_STATIC_LIBRARIES) - endif() - - # No lookup in environment variables (PATH on Windows), as they may contain wrong library versions -+ if(NOT ${THIS_FRIENDLY_NAME}_LIB) - find_library(${THIS_FRIENDLY_NAME}_LIB NAMES ${THIS_SEARCH_NAMES} - PATHS ${FIND_SFML_PATHS} PATH_SUFFIXES lib NO_SYSTEM_ENVIRONMENT_PATH) - mark_as_advanced(${THIS_FRIENDLY_NAME}_LIB) -+ endif() - if(${THIS_FRIENDLY_NAME}_LIB) - set_property(TARGET ${THIS_TARGET} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${${THIS_FRIENDLY_NAME}_LIB}") - else() -@@ -64,6 +66,9 @@ if(SFML_STATIC_LIBRARIES) - if (FIND_SFML_OS_WINDOWS) - set_property(TARGET OpenGL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "OpenGL32") - elseif(NOT FIND_SFML_OS_IOS) -+ set(OpenGL_GL_PREFERENCE "@EXPORT_OpenGL_GL_PREFERENCE@") -+ find_dependency(OpenGL) -+ set(OpenGL_LIB OpenGL::GL) - sfml_bind_dependency(TARGET OpenGL FRIENDLY_NAME "OpenGL" SEARCH_NAMES "OpenGL" "GL") - endif() - endif() -@@ -71,6 +76,8 @@ if(SFML_STATIC_LIBRARIES) - # sfml-graphics - list(FIND SFML_FIND_COMPONENTS "graphics" FIND_SFML_GRAPHICS_COMPONENT_INDEX) - if(FIND_SFML_GRAPHICS_COMPONENT_INDEX GREATER -1) -+ find_dependency(Freetype) -+ set(FreeType_LIB Freetype::Freetype) - sfml_bind_dependency(TARGET Freetype FRIENDLY_NAME "FreeType" SEARCH_NAMES "freetype") - endif() - -diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt -index a939a988..259835f7 100644 ---- a/src/SFML/Graphics/CMakeLists.txt -+++ b/src/SFML/Graphics/CMakeLists.txt -@@ -93,7 +93,8 @@ sfml_add_library(sfml-graphics - target_link_libraries(sfml-graphics PUBLIC sfml-window) - - # stb_image sources --target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/stb_image") -+find_path(STB_INCLUDE_DIR stb_image.h REQUIRED) -+target_include_directories(sfml-graphics PRIVATE "${STB_INCLUDE_DIR}") - - # glad sources - target_include_directories(sfml-graphics SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include") -@@ -123,7 +124,8 @@ if((SFML_COMPILER_MSVC AND SFML_MSVC_VERSION GREATER_EQUAL 14) OR (SFML_COMPILER - target_link_libraries(sfml-graphics PRIVATE legacy_stdio_definitions.lib) - endif() - --sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY") -+set(FreeType_LIB Freetype::Freetype) -+sfml_find_package(Freetype LINK FreeType_LIB) - target_link_libraries(sfml-graphics PRIVATE Freetype) - - # add preprocessor symbols -diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt -index d2bdd5aa..2a9937f1 100644 ---- a/src/SFML/Window/CMakeLists.txt -+++ b/src/SFML/Window/CMakeLists.txt -@@ -325,7 +325,9 @@ elseif(SFML_OS_ANDROID) - target_link_libraries(sfml-window PRIVATE EGL) - target_link_libraries(sfml-window PRIVATE GLES) - else() -- sfml_find_package(OpenGL INCLUDE "OPENGL_INCLUDE_DIR" LINK "OPENGL_gl_LIBRARY") -+ set(EXPORT_OpenGL_GL_PREFERENCE "${OpenGL_GL_PREFERENCE}" CACHE INTERNAL "") -+ set(OpenGL_LIB OpenGL::GL) -+ sfml_find_package(OpenGL LINK OpenGL_LIB) - target_link_libraries(sfml-window PRIVATE OpenGL) - endif() - diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index e8034032cf981f..62aff33b87ed2a 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -2,17 +2,11 @@ vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO SFML/SFML REF "${VERSION}" HEAD_REF master - SHA512 d8a8bee3aa9acda4609104c2a9d4a2512e4be6d6e85fd4b24c287c03f60cfb888e669e61bfac4113dae35f0c3492559b65b3453baf38766d8c0223d9ab77aada - PATCHES - fix-dependencies.patch - fix-dep-openal.patch + SHA512 116b934950b02639aa0924cdf6ceaf34518be7f94037e77e52f374aa0a03403487ef58384137569d930961c7d65291a7f0bbddcf1eaf4260086f49afbfae1f27 ) -# The embedded FindFreetype doesn't properly handle debug libraries -file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake") - if(VCPKG_TARGET_IS_LINUX) - message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n libxcursor\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev") + message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxi\n libxrandr\n libxcursor\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxi-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev") endif() vcpkg_check_features( @@ -31,11 +25,10 @@ vcpkg_cmake_configure( -DSFML_USE_SYSTEM_DEPS=ON -DSFML_MISC_INSTALL_PREFIX=share/sfml -DSFML_GENERATE_PDB=OFF - -DSFML_WARNINGS_AS_ERRORS=OFF #Remove in the next version + -DSFML_INSTALL_PKGCONFIG_FILES=OFF ${FEATURE_OPTIONS} MAYBE_UNUSED_VARIABLES SFML_MISC_INSTALL_PREFIX - SFML_WARNINGS_AS_ERRORS ) vcpkg_cmake_install() @@ -58,27 +51,6 @@ endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") -set(SHOULD_REMOVE_SFML_ALL 0) -if(NOT "audio" IN_LIST FEATURES) - file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-audio.pc") - set(SHOULD_REMOVE_SFML_ALL 1) -endif() -if(NOT "graphics" IN_LIST FEATURES) - file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-graphics.pc") - set(SHOULD_REMOVE_SFML_ALL 1) -endif() -if(NOT "network" IN_LIST FEATURES) - file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-network.pc") - set(SHOULD_REMOVE_SFML_ALL 1) -endif() -if(NOT "window" IN_LIST FEATURES) - file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-window.pc") - set(SHOULD_REMOVE_SFML_ALL 1) -endif() -if(SHOULD_REMOVE_SFML_ALL) - file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-all.pc") -endif() - vcpkg_fixup_pkgconfig() file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/sfml/usage b/ports/sfml/usage index 39d986d2ff6861..79c19c3e9ac758 100644 --- a/ports/sfml/usage +++ b/ports/sfml/usage @@ -1,7 +1,7 @@ The package sfml provides CMake targets: - find_package(SFML COMPONENTS system window graphics audio CONFIG REQUIRED) - target_link_libraries(main PRIVATE sfml-system sfml-network sfml-graphics sfml-window sfml-audio) + find_package(SFML COMPONENTS Network Graphics Window Audio System CONFIG REQUIRED) + target_link_libraries(main PRIVATE SFML::Network SFML::Graphics SFML::Window SFML::Audio SFML::System) # If you want SFML to provide an implementation of main(): - target_link_libraries(main PRIVATE sfml-main) + target_link_libraries(main PRIVATE SFML::Main) diff --git a/ports/sfml/vcpkg.json b/ports/sfml/vcpkg.json index f7d0d03692590d..76eb8895d26177 100644 --- a/ports/sfml/vcpkg.json +++ b/ports/sfml/vcpkg.json @@ -1,6 +1,6 @@ { "name": "sfml", - "version": "2.6.2", + "version": "3.0.0", "description": "Simple and fast multimedia library", "homepage": "https://github.com/SFML/SFML", "license": "Zlib", @@ -27,7 +27,7 @@ "libflac", "libogg", "libvorbis", - "openal-soft" + "miniaudio" ] }, "graphics": { diff --git a/versions/baseline.json b/versions/baseline.json index c517b3bd5fb398..54bdbae2a0d802 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3705,8 +3705,8 @@ "port-version": 2 }, "imgui-sfml": { - "baseline": "2.6", - "port-version": 1 + "baseline": "3.0", + "port-version": 0 }, "imguizmo": { "baseline": "2024-05-29", @@ -8341,7 +8341,7 @@ "port-version": 6 }, "sfml": { - "baseline": "2.6.2", + "baseline": "3.0.0", "port-version": 0 }, "sfsexp": { diff --git a/versions/i-/imgui-sfml.json b/versions/i-/imgui-sfml.json index d303cbf907122b..b8eff251579768 100644 --- a/versions/i-/imgui-sfml.json +++ b/versions/i-/imgui-sfml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d97a22934a499fb47307f798123f64137b700e80", + "version": "3.0", + "port-version": 0 + }, { "git-tree": "68bb56897b198937d6aade36289e5f74167bb99d", "version": "2.6", diff --git a/versions/s-/sfml.json b/versions/s-/sfml.json index 00bfcc43247b3b..1913170e6d3856 100644 --- a/versions/s-/sfml.json +++ b/versions/s-/sfml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "72dfe19299a1cb204b62e657e6312e628fcb0b6a", + "version": "3.0.0", + "port-version": 0 + }, { "git-tree": "16580cf264c6a8933fb657e425a5866568d4c394", "version": "2.6.2",