early-access version 2853
This commit is contained in:
50
externals/vcpkg/ports/imgui-sfml/0001-fix_find_package.patch
vendored
Executable file
50
externals/vcpkg/ports/imgui-sfml/0001-fix_find_package.patch
vendored
Executable file
@@ -0,0 +1,50 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3a974c4..8a1c6cd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,34 +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 ccontains SFMLConfig.cmake)")
|
||||
endif()
|
||||
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.80 REQUIRED)
|
||||
-
|
||||
-# these headers will be installed alongside ImGui-SFML
|
||||
-set(IMGUI_PUBLIC_HEADERS
|
||||
- ${IMGUI_INCLUDE_DIR}/imconfig.h
|
||||
- ${IMGUI_INCLUDE_DIR}/imgui.h
|
||||
- ${IMGUI_INCLUDE_DIR}/imgui_internal.h # not actually public, but users might need it
|
||||
- ${IMGUI_INCLUDE_DIR}/imstb_rectpack.h
|
||||
- ${IMGUI_INCLUDE_DIR}/imstb_textedit.h
|
||||
- ${IMGUI_INCLUDE_DIR}/imstb_truetype.h
|
||||
- ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.h
|
||||
-)
|
||||
+find_package(imgui CONFIG REQUIRED)
|
||||
|
||||
if (IMGUI_SFML_IMGUI_DEMO)
|
||||
list(APPEND IMGUI_SOURCES ${IMGUI_DEMO_SOURCES})
|
||||
@@ -92,7 +72,7 @@ add_library(ImGui-SFML
|
||||
add_library(ImGui-SFML::ImGui-SFML ALIAS ImGui-SFML)
|
||||
|
||||
target_link_libraries(ImGui-SFML
|
||||
- PUBLIC
|
||||
+ imgui::imgui
|
||||
sfml-graphics
|
||||
sfml-system
|
||||
sfml-window
|
||||
14
externals/vcpkg/ports/imgui-sfml/004-fix-find-sfml.patch
vendored
Executable file
14
externals/vcpkg/ports/imgui-sfml/004-fix-find-sfml.patch
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8a1c6cd..7156f51 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -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")
|
||||
|
||||
if (IMGUI_SFML_FIND_SFML)
|
||||
- if (NOT BUILD_SHARED_LIBS)
|
||||
- set(SFML_STATIC_LIBRARIES ON)
|
||||
- endif()
|
||||
find_package(SFML COMPONENTS graphics system window)
|
||||
|
||||
if(NOT SFML_FOUND)
|
||||
24
externals/vcpkg/ports/imgui-sfml/portfile.cmake
vendored
Executable file
24
externals/vcpkg/ports/imgui-sfml/portfile.cmake
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO eliasdaler/imgui-sfml
|
||||
REF 004efd85a590343e8c9d166dc9d2524c199c9450 #v2.5
|
||||
SHA512 feb11f0a52f89eedc5af4c686b71290a48d69e7bc371f29536eb51752d00b6879d642625f494035d2ccc0500878757709afa2a3810ac17496506db754a3a4ed6
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-fix_find_package.patch
|
||||
004-fix-find-sfml.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME ImGui-SFML CONFIG_PATH lib/cmake/ImGui-SFML)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
10
externals/vcpkg/ports/imgui-sfml/usage
vendored
Executable file
10
externals/vcpkg/ports/imgui-sfml/usage
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
The package imgui-sfml provides CMake targets:
|
||||
|
||||
find_package(imgui CONFIG REQUIRED)
|
||||
find_package(SFML CONFIG REQUIRED COMPONENTS graphics system window)
|
||||
find_package(ImGui-SFML CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE
|
||||
imgui::imgui
|
||||
sfml-graphics sfml-system sfml-window
|
||||
ImGui-SFML::ImGui-SFML
|
||||
)
|
||||
20
externals/vcpkg/ports/imgui-sfml/vcpkg.json
vendored
Executable file
20
externals/vcpkg/ports/imgui-sfml/vcpkg.json
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "imgui-sfml",
|
||||
"version": "2.5",
|
||||
"description": "ImGui binding for use with SFML",
|
||||
"homepage": "https://github.com/eliasdaler/imgui-sfml",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
"imgui",
|
||||
"opengl",
|
||||
"sfml",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user