Compare commits
31 Commits
main
...
e17e20aaa9
| Author | SHA1 | Date | |
|---|---|---|---|
| e17e20aaa9 | |||
| a8924b5739 | |||
| 97b4040733 | |||
| 043acde884 | |||
| 4c31b429b9 | |||
| dd887865f0 | |||
| 8739130a7b | |||
| 280220a157 | |||
| e432b38162 | |||
| e98be74d99 | |||
| 3a6b1512d4 | |||
| 4d751805d2 | |||
| 15592444a7 | |||
| 17eea3fe02 | |||
| 1dd9adf4fd | |||
| 8e515d495c | |||
| 43fceadaac | |||
| 103610550a | |||
| 06700d29fb | |||
| 5dea03650d | |||
| fb870a5028 | |||
| 41c7a31b62 | |||
| 99959dbefc | |||
| c49e398f30 | |||
| edff40e77a | |||
| 6c90c821bf | |||
| 451568113a | |||
| 4689d0a002 | |||
| 030bf0a590 | |||
| 65be0a9fac | |||
| 534384356e |
@@ -25,6 +25,7 @@ jobs:
|
|||||||
|
|
||||||
{ name: "vulkan-headers", version: "1.4.341.0", location: "all" },
|
{ name: "vulkan-headers", version: "1.4.341.0", location: "all" },
|
||||||
{ name: "spirv-headers", version: "1.4.341.0", location: "all" },
|
{ name: "spirv-headers", version: "1.4.341.0", location: "all" },
|
||||||
|
{ name: "spirv-cross", version: "1.4.341.0", location: "all" },
|
||||||
|
|
||||||
{ name: "pixelmatch-cpp17", version: "1.0.3", location: "all" },
|
{ name: "pixelmatch-cpp17", version: "1.0.3", location: "all" },
|
||||||
{ name: "lodepng", version: "cci.20260210", location: "all" },
|
{ name: "lodepng", version: "cci.20260210", location: "all" },
|
||||||
@@ -38,6 +39,8 @@ jobs:
|
|||||||
{ name: "rapidhash", version: "3.0", location: "all" },
|
{ name: "rapidhash", version: "3.0", location: "all" },
|
||||||
{ name: "cli11", version: "2.6.1", location: "all" },
|
{ name: "cli11", version: "2.6.1", location: "all" },
|
||||||
{ name: "assimp", version: "6.0.4", location: "5.x" },
|
{ name: "assimp", version: "6.0.4", location: "5.x" },
|
||||||
|
|
||||||
|
{ name: "imgui", version: "1.92.6-docking", location: "all" },
|
||||||
]
|
]
|
||||||
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
74
imgui/all/CMakeLists.txt
Normal file
74
imgui/all/CMakeLists.txt
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.9)
|
||||||
|
project(imgui LANGUAGES CXX)
|
||||||
|
|
||||||
|
set(MISC_DIR ${IMGUI_SRC_DIR}/misc)
|
||||||
|
set(EXTRA_FONTS_DIR ${MISC_DIR}/fonts)
|
||||||
|
set(IMGUI_EXPORT_HEADERS imgui_export_headers.h)
|
||||||
|
|
||||||
|
file(GLOB SOURCE_FILES ${IMGUI_SRC_DIR}/*.cpp)
|
||||||
|
file(GLOB HEADER_FILES ${IMGUI_SRC_DIR}/*.h)
|
||||||
|
|
||||||
|
if(IMGUI_ENABLE_TEST_ENGINE)
|
||||||
|
message(STATUS "Building ImGui with test engine")
|
||||||
|
file(GLOB TEST_ENGINE_FILES ${IMGUI_TEST_ENGINE_DIR}/imgui_test_engine/*.cpp)
|
||||||
|
list(APPEND SOURCE_FILES ${TEST_ENGINE_FILES})
|
||||||
|
file(GLOB TEST_ENGINE_HEADER_FILES ${IMGUI_TEST_ENGINE_DIR}/imgui_test_engine/*.h)
|
||||||
|
list(APPEND HEADER_FILES ${TEST_ENGINE_HEADER_FILES})
|
||||||
|
else()
|
||||||
|
message(STATUS "Building ImGui without test engine")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GLOB EXTRA_FONTS_FILES ${EXTRA_FONTS_DIR}/*.ttf)
|
||||||
|
if (MSVC)
|
||||||
|
file(GLOB EXTRA_NATVIS_FILES ${MISC_DIR}/natvis/*.natvis)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(BINARY_TO_COMPRESSED_BIN binary_to_compressed_c)
|
||||||
|
|
||||||
|
add_executable(${BINARY_TO_COMPRESSED_BIN} ${EXTRA_FONTS_DIR}/binary_to_compressed_c.cpp)
|
||||||
|
target_compile_features(${BINARY_TO_COMPRESSED_BIN} PRIVATE cxx_std_11)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME} ${SOURCE_FILES})
|
||||||
|
|
||||||
|
if(IMGUI_WITH_SDL3_BINDING)
|
||||||
|
target_sources(${PROJECT_NAME} PRIVATE ${IMGUI_SRC_DIR}/backends/imgui_impl_sdl3.cpp)
|
||||||
|
list(APPEND HEADER_FILES ${IMGUI_SRC_DIR}/backends/imgui_impl_sdl3.h)
|
||||||
|
find_package(SDL3 REQUIRED CONFIG)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PUBLIC SDL3::SDL3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
|
CXX_VISIBILITY_PRESET hidden
|
||||||
|
VISIBILITY_INLINES_HIDDEN ON
|
||||||
|
)
|
||||||
|
include(GenerateExportHeader)
|
||||||
|
generate_export_header(${PROJECT_NAME}
|
||||||
|
EXPORT_MACRO_NAME IMGUI_API
|
||||||
|
EXPORT_FILE_NAME ${IMGUI_EXPORT_HEADERS}
|
||||||
|
)
|
||||||
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${IMGUI_SRC_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||||
|
$<INSTALL_INTERFACE:include>
|
||||||
|
)
|
||||||
|
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
install(TARGETS ${PROJECT_NAME}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
install(TARGETS ${BINARY_TO_COMPRESSED_BIN}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
install(FILES ${HEADER_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${IMGUI_EXPORT_HEADERS}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
|
install(FILES ${EXTRA_FONTS_FILES}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/res/fonts
|
||||||
|
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
|
if (MSVC)
|
||||||
|
install(FILES ${EXTRA_NATVIS_FILES}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/res/natvis
|
||||||
|
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
|
endif()
|
||||||
94
imgui/all/conandata.yml
Normal file
94
imgui/all/conandata.yml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# this package's recipe relies on version suffixes to handle imgui's docking branch.
|
||||||
|
# Suffix: -docking for docking branch sources
|
||||||
|
sources:
|
||||||
|
"1.92.6":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.92.6.tar.gz"
|
||||||
|
sha256: "5b17c01f69545bde732b14936d89ce0f508adb83e8b56fa82448371845172bc3"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.6.tar.gz"
|
||||||
|
sha256: "5374ec2318933f9fc663d924529ea80e5fa40866e82fafc3872ae94a16fdbc7f"
|
||||||
|
"1.92.6-docking":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.92.6-docking.tar.gz"
|
||||||
|
sha256: "5e84cdaa6a6041586a0d11a3071b749734a0439d66fdbdad37ae5b27e37d396c"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.6.tar.gz"
|
||||||
|
sha256: "5374ec2318933f9fc663d924529ea80e5fa40866e82fafc3872ae94a16fdbc7f"
|
||||||
|
"1.92.2b":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.92.2b.tar.gz"
|
||||||
|
sha256: "da3d453cce74e0fb3d67f8d798a2a8d04fcaf0b33ce0e0131d0695dfc4f64191"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.2.tar.gz"
|
||||||
|
sha256: "5914327269b2dd9ad66bead3be8577f99f5f572d196bbe4028f6812cf0356adb"
|
||||||
|
"1.92.2b-docking":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.92.2b-docking.tar.gz"
|
||||||
|
sha256: "f6ad86e6f938fdda4d5e362b9a9b39158963dd3257fdc9902efc148c0c0c39f9"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.2.tar.gz"
|
||||||
|
sha256: "5914327269b2dd9ad66bead3be8577f99f5f572d196bbe4028f6812cf0356adb"
|
||||||
|
"1.91.8":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.91.8.tar.gz"
|
||||||
|
sha256: "db3a2e02bfd6c269adf0968950573053d002f40bdfb9ef2e4a90bce804b0f286"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.91.8.tar.gz"
|
||||||
|
sha256: "bdfc31cb819bd6e4df2d5da0316edf92b1011d1c4046293aafd9ae14106570e2"
|
||||||
|
"1.91.8-docking":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.91.8-docking.tar.gz"
|
||||||
|
sha256: "55f5e65abea635f2a8bfa9a92cd966448a363a262cf6dead7cc662fb0ab37612"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.91.8.tar.gz"
|
||||||
|
sha256: "bdfc31cb819bd6e4df2d5da0316edf92b1011d1c4046293aafd9ae14106570e2"
|
||||||
|
"1.90.9":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.90.9.tar.gz"
|
||||||
|
sha256: "04943919721e874ac75a2f45e6eb6c0224395034667bf508923388afda5a50bf"
|
||||||
|
"1.90.9-docking":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.90.9-docking.tar.gz"
|
||||||
|
sha256: "48e7e4e4f154ad98d0946126a84e2375f849f6a67792129a805817dd60a34330"
|
||||||
|
"1.90.5":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.90.5.tar.gz"
|
||||||
|
sha256: "e94b48dba7311c85ba8e3e6fe7c734d76a0eed21b2b42c5180fd5706d1562241"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.90.5.tar.gz"
|
||||||
|
sha256: "79339246d8c919c5926df0a7bee99be585ebaf67cdaba89a0ac314b1f7846f92"
|
||||||
|
"1.90.5-docking":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.90.5-docking.tar.gz"
|
||||||
|
sha256: "8a5e1e594d6c8552e46e4c1ba8dd9deb51262067f04937904babc04384533ccc"
|
||||||
|
testengine:
|
||||||
|
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.90.5.tar.gz"
|
||||||
|
sha256: "79339246d8c919c5926df0a7bee99be585ebaf67cdaba89a0ac314b1f7846f92"
|
||||||
|
"1.88":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.88.tar.gz"
|
||||||
|
sha256: "9f14c788aee15b777051e48f868c5d4d959bd679fc5050e3d2a29de80d8fd32e"
|
||||||
|
"1.87":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.87.tar.gz"
|
||||||
|
sha256: "b54ceb35bda38766e36b87c25edf7a1cd8fd2cb8c485b245aedca6fb85645a20"
|
||||||
|
"1.86":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.86.tar.gz"
|
||||||
|
sha256: "6ba6ae8425a19bc52c5e067702c48b70e4403cd339cba02073a462730a63e825"
|
||||||
|
"1.85":
|
||||||
|
core:
|
||||||
|
url: "https://github.com/ocornut/imgui/archive/v1.85.tar.gz"
|
||||||
|
sha256: "7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77"
|
||||||
|
patches:
|
||||||
|
"1.92.4":
|
||||||
|
- patch_file: "patches/1.92.4-0001-static-linking-bugfix-backport.patch"
|
||||||
|
patch_description: "Add missing export for a function needed by the backends"
|
||||||
|
patch_source: "https://github.com/ocornut/imgui/pull/9016"
|
||||||
|
patch_type: "backport"
|
||||||
|
"1.92.4-docking":
|
||||||
|
- patch_file: "patches/1.92.4-docking-0001-static-linking-bugfix-backport.patch"
|
||||||
|
patch_description: "Add missing export for a function needed by the backends"
|
||||||
|
patch_source: "https://github.com/ocornut/imgui/pull/9016"
|
||||||
|
patch_type: "backport"
|
||||||
127
imgui/all/conanfile.py
Normal file
127
imgui/all/conanfile.py
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from conan import ConanFile
|
||||||
|
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps
|
||||||
|
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file
|
||||||
|
from conan.tools.scm import Version
|
||||||
|
|
||||||
|
required_conan_version = ">=1.53.0"
|
||||||
|
|
||||||
|
|
||||||
|
class IMGUIConan(ConanFile):
|
||||||
|
name = "imgui"
|
||||||
|
description = "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies"
|
||||||
|
license = "MIT"
|
||||||
|
url = "https://github.com/conan-io/conan-center-index"
|
||||||
|
homepage = "https://github.com/ocornut/imgui"
|
||||||
|
topics = ("gui", "graphical", "bloat-free")
|
||||||
|
package_type = "library"
|
||||||
|
|
||||||
|
settings = "os", "arch", "compiler", "build_type"
|
||||||
|
options = {
|
||||||
|
"shared": [True, False],
|
||||||
|
"fPIC": [True, False],
|
||||||
|
"enable_test_engine": [True, False],
|
||||||
|
"with_sdl3_binding": [True, False],
|
||||||
|
}
|
||||||
|
default_options = {
|
||||||
|
"shared": False,
|
||||||
|
"fPIC": True,
|
||||||
|
"enable_test_engine": False,
|
||||||
|
"with_sdl3_binding": False,
|
||||||
|
}
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
if self.options.get_safe("with_sdl3_binding"):
|
||||||
|
self.requires("sdl/[>3 <4]", transitive_headers=True)
|
||||||
|
|
||||||
|
def export_sources(self):
|
||||||
|
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
|
||||||
|
export_conandata_patches(self)
|
||||||
|
|
||||||
|
def config_options(self):
|
||||||
|
if self.settings.os == "Windows":
|
||||||
|
del self.options.fPIC
|
||||||
|
if "testengine" not in self.conan_data["sources"][self.version]:
|
||||||
|
self.output.warning("No test engine found for this version, removing test engine option")
|
||||||
|
del self.options.enable_test_engine
|
||||||
|
|
||||||
|
# sdl3 bindings were introduced with 1.89.3
|
||||||
|
# 1.91.8 is the oldest version that supports the latest sdl headers
|
||||||
|
if Version(self.version) < "1.91.8":
|
||||||
|
del self.options.with_sdl3_binding
|
||||||
|
|
||||||
|
def configure(self):
|
||||||
|
if self.options.shared:
|
||||||
|
self.options.rm_safe("fPIC")
|
||||||
|
|
||||||
|
def layout(self):
|
||||||
|
cmake_layout(self, src_folder="src")
|
||||||
|
|
||||||
|
def source(self):
|
||||||
|
get(self, **self.conan_data["sources"][self.version]["core"], strip_root=True)
|
||||||
|
if "testengine" in self.conan_data["sources"][self.version]:
|
||||||
|
get(self, **self.conan_data["sources"][self.version]["testengine"], strip_root=True, destination="test_engine")
|
||||||
|
self._patch_sources()
|
||||||
|
|
||||||
|
def generate(self):
|
||||||
|
tc = CMakeToolchain(self)
|
||||||
|
tc.variables["IMGUI_SRC_DIR"] = self.source_folder.replace("\\", "/")
|
||||||
|
tc.variables["IMGUI_WITH_SDL3_BINDING"] = self.options.get_safe("with_sdl3_binding", False)
|
||||||
|
# test engine is not available for all versions
|
||||||
|
if self.options.get_safe("enable_test_engine"):
|
||||||
|
tc.preprocessor_definitions["IMGUI_ENABLE_TEST_ENGINE"] = "1"
|
||||||
|
tc.preprocessor_definitions["IMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL"] = "1"
|
||||||
|
tc.variables["IMGUI_ENABLE_TEST_ENGINE"] = "ON"
|
||||||
|
tc.variables["IMGUI_TEST_ENGINE_DIR"] = os.path.join(self.source_folder, "test_engine").replace("\\", "/")
|
||||||
|
tc.generate()
|
||||||
|
|
||||||
|
deps = CMakeDeps(self)
|
||||||
|
deps.generate()
|
||||||
|
|
||||||
|
def _patch_sources(self):
|
||||||
|
apply_conandata_patches(self)
|
||||||
|
|
||||||
|
# Ensure we take into account export_headers
|
||||||
|
replace_in_file(self,
|
||||||
|
os.path.join(self.source_folder, "imgui.h"),
|
||||||
|
"#ifdef IMGUI_USER_CONFIG",
|
||||||
|
"#include \"imgui_export_headers.h\"\n\n#ifdef IMGUI_USER_CONFIG"
|
||||||
|
)
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir))
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
|
||||||
|
backends_folder = os.path.join(self.source_folder, "backends")
|
||||||
|
copy(self, pattern="imgui_impl_*",
|
||||||
|
dst=os.path.join(self.package_folder, "res", "bindings"),
|
||||||
|
src=backends_folder)
|
||||||
|
copy(self, pattern="imgui*.cpp",
|
||||||
|
dst=os.path.join(self.package_folder, "res", "src"),
|
||||||
|
src=os.path.join(self.source_folder))
|
||||||
|
copy(self, pattern="*.*",
|
||||||
|
dst=os.path.join(self.package_folder, "res", "misc", "cpp"),
|
||||||
|
src=os.path.join(self.source_folder, "misc", "cpp"))
|
||||||
|
copy(self, pattern="*.*",
|
||||||
|
dst=os.path.join(self.package_folder, "res", "misc", "freetype"),
|
||||||
|
src=os.path.join(self.source_folder, "misc", "freetype"))
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.install()
|
||||||
|
|
||||||
|
def package_info(self):
|
||||||
|
_is_docking_branch = "docking" in str(self.version)
|
||||||
|
self.conf_info.define("user.imgui:with_docking", _is_docking_branch)
|
||||||
|
self.cpp_info.libs = ["imgui"]
|
||||||
|
if self.settings.os == "Linux":
|
||||||
|
self.cpp_info.system_libs.append("m")
|
||||||
|
if self.settings.os == "Windows":
|
||||||
|
self.cpp_info.system_libs.append("imm32")
|
||||||
|
self.cpp_info.srcdirs = [os.path.join("res", "bindings")]
|
||||||
|
|
||||||
|
bin_path = os.path.join(self.package_folder, "bin")
|
||||||
|
self.output.info("Appending PATH env var with : {}".format(bin_path))
|
||||||
|
self.env_info.PATH.append(bin_path)
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
diff --git imgui.h imgui.h
|
||||||
|
index 0a216b76..baeda39b 100644
|
||||||
|
--- imgui.h
|
||||||
|
+++ imgui.h
|
||||||
|
@@ -3978,8 +3978,8 @@ struct ImGuiPlatformIO
|
||||||
|
// Functions
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
- void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
||||||
|
- void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
||||||
|
+ IMGUI_API void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
||||||
|
+ IMGUI_API void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
||||||
|
};
|
||||||
|
|
||||||
|
// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. Handler is called during EndFrame().
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
diff --git imgui.h imgui.h
|
||||||
|
index d0f071d2..8328e9a3 100644
|
||||||
|
--- imgui.h
|
||||||
|
+++ imgui.h
|
||||||
|
@@ -4235,8 +4235,8 @@ struct ImGuiPlatformIO
|
||||||
|
// Functions
|
||||||
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
|
- void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
||||||
|
- void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
||||||
|
+ IMGUI_API void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
||||||
|
+ IMGUI_API void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
||||||
|
};
|
||||||
|
|
||||||
|
// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI.
|
||||||
20
imgui/all/test_package/CMakeLists.txt
Normal file
20
imgui/all/test_package/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
project(test_package LANGUAGES CXX)
|
||||||
|
|
||||||
|
find_package(imgui REQUIRED CONFIG)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} test_package.cpp)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE imgui::imgui)
|
||||||
|
|
||||||
|
option(DOCKING "Test docking" OFF)
|
||||||
|
|
||||||
|
if (DOCKING)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE -DDOCKING)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_TEST_ENGINE)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PRIVATE -DENABLE_TEST_ENGINE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PUBLIC "IMGUI_USER_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/my_imgui_config.h\"")
|
||||||
|
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
||||||
35
imgui/all/test_package/conanfile.py
Normal file
35
imgui/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
from conan import ConanFile
|
||||||
|
from conan.tools.build import can_run
|
||||||
|
from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
class TestPackageConan(ConanFile):
|
||||||
|
settings = "os", "arch", "compiler", "build_type"
|
||||||
|
generators = "CMakeDeps", "VirtualRunEnv"
|
||||||
|
test_type = "explicit"
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
self.requires(self.tested_reference_str)
|
||||||
|
|
||||||
|
def layout(self):
|
||||||
|
cmake_layout(self)
|
||||||
|
|
||||||
|
def generate(self):
|
||||||
|
with_docking = self.dependencies[self.tested_reference_str].conf_info.get("user.imgui:with_docking", False)
|
||||||
|
with_test_engine = self.dependencies[self.tested_reference_str].options.get_safe("enable_test_engine", False)
|
||||||
|
tc = CMakeToolchain(self)
|
||||||
|
tc.variables["DOCKING"] = with_docking
|
||||||
|
tc.variables["ENABLE_TEST_ENGINE"] = with_test_engine
|
||||||
|
tc.generate()
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.configure()
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
if can_run(self):
|
||||||
|
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||||
|
self.run(bin_path, env="conanrun")
|
||||||
11
imgui/all/test_package/my_imgui_config.h
Normal file
11
imgui/all/test_package/my_imgui_config.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace ImGui
|
||||||
|
{
|
||||||
|
void MyFunction(const char* name) {
|
||||||
|
printf(" ImGui::MyFunction(%s)\n", name);
|
||||||
|
}
|
||||||
|
}
|
||||||
33
imgui/all/test_package/test_package.cpp
Normal file
33
imgui/all/test_package/test_package.cpp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#include <imgui.h>
|
||||||
|
#ifdef DOCKING
|
||||||
|
#include <imgui_internal.h>
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_TEST_ENGINE
|
||||||
|
#include <imgui_te_engine.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int, char**)
|
||||||
|
{
|
||||||
|
printf("IMGUI VERSION: %s\n", IMGUI_VERSION);
|
||||||
|
ImGui::CreateContext();
|
||||||
|
#ifdef DOCKING
|
||||||
|
printf(" with docking\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_TEST_ENGINE
|
||||||
|
printf(" with test engine\n");
|
||||||
|
ImGuiTestEngine *engine = ImGuiTestEngine_CreateContext();
|
||||||
|
if (engine == NULL) {
|
||||||
|
printf(" Failed to create test engine context\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
ImGui::DestroyContext();
|
||||||
|
ImGuiTestEngine_DestroyContext(engine);
|
||||||
|
#else
|
||||||
|
ImGui::DestroyContext();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
29
imgui/config.yml
Normal file
29
imgui/config.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
versions:
|
||||||
|
"1.92.6":
|
||||||
|
folder: all
|
||||||
|
"1.92.6-docking":
|
||||||
|
folder: all
|
||||||
|
"1.92.2b":
|
||||||
|
folder: all
|
||||||
|
"1.92.2b-docking":
|
||||||
|
folder: all
|
||||||
|
"1.91.8":
|
||||||
|
folder: all
|
||||||
|
"1.91.8-docking":
|
||||||
|
folder: all
|
||||||
|
"1.90.9":
|
||||||
|
folder: all
|
||||||
|
"1.90.9-docking":
|
||||||
|
folder: all
|
||||||
|
"1.90.5":
|
||||||
|
folder: all
|
||||||
|
"1.90.5-docking":
|
||||||
|
folder: all
|
||||||
|
"1.88":
|
||||||
|
folder: all
|
||||||
|
"1.87":
|
||||||
|
folder: all
|
||||||
|
"1.86":
|
||||||
|
folder: all
|
||||||
|
"1.85":
|
||||||
|
folder: all
|
||||||
38
spirv-cross/all/conandata.yml
Normal file
38
spirv-cross/all/conandata.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
sources:
|
||||||
|
"1.4.341.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
||||||
|
sha256: "b2665ac9ddb65ff75a7ca2f6d410e73da443692742a1e3a5b7728ca6069a400c"
|
||||||
|
"1.4.321.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.321.0.tar.gz"
|
||||||
|
sha256: "6037555620c27105bf1d4068a6eeb4b0d7953630d556a1ca9799dfe06fd2fb68"
|
||||||
|
"1.4.313.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
||||||
|
sha256: "7d1de24918bea9897753f7561d4d154f68ec89c36bb70c13598222b8039d4212"
|
||||||
|
"1.4.309.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.309.0.tar.gz"
|
||||||
|
sha256: "cf4f12a767d63f63024e61750e372ffdc95567513b99ed9be6f21f474b328ddd"
|
||||||
|
"1.3.296.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz"
|
||||||
|
sha256: "4f7f9a8a643e6694f155712016b9b572c13a9444e65b3f43b27bb464c0ab76e0"
|
||||||
|
"1.3.268.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz"
|
||||||
|
sha256: "dd656a51ba4c229c1a0bb220b7470723e8fd4b68abb7f2cf2ca4027df824f4a0"
|
||||||
|
"1.3.261.1":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.261.1.tar.gz"
|
||||||
|
sha256: "a5cf99ed62e93800232e50b782890321d4d7e053dcaa71bd8efc0c48a00bd1dd"
|
||||||
|
"1.3.250.1":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.250.1.tar.gz"
|
||||||
|
sha256: "5b7402d7078eeffca0926875b1dcd0f5dd78791a30529de7c8456686f6fc52ce"
|
||||||
|
"1.3.246.1":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.246.1.tar.gz"
|
||||||
|
sha256: "44d1aef7e6e247b4b7ec6a1ef0bbb43cc9b681ee689393db90ac815d240808b1"
|
||||||
|
"1.3.243.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.243.0.tar.gz"
|
||||||
|
sha256: "549fff809de2b3484bcc5d710ccd76ca29cbd764dd304c3687252e2f3d034e06"
|
||||||
|
"1.3.239.0":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.239.0.tar.gz"
|
||||||
|
sha256: "a1695022880e7ef3c2d407647f79876045dc2a3ed012753adc71ead5cc5178ba"
|
||||||
|
# commit used in Vulkan SDK 1.2.198.0
|
||||||
|
"cci.20211113":
|
||||||
|
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/7c3cb0b12c9965497b08403c82ac1b82846fa7be.tar.gz"
|
||||||
|
sha256: "5bb6837e2b75db1a9e36e7d6eac40d905e3460ff3b5234f391adc6bdf6aadcdf"
|
||||||
206
spirv-cross/all/conanfile.py
Normal file
206
spirv-cross/all/conanfile.py
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
from conan import ConanFile
|
||||||
|
from conan.errors import ConanInvalidConfiguration
|
||||||
|
from conan.tools.build import stdcpp_library
|
||||||
|
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
||||||
|
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save
|
||||||
|
import os
|
||||||
|
import textwrap
|
||||||
|
|
||||||
|
required_conan_version = ">=1.54.0"
|
||||||
|
|
||||||
|
|
||||||
|
class SpirvCrossConan(ConanFile):
|
||||||
|
name = "spirv-cross"
|
||||||
|
description = "SPIRV-Cross is a practical tool and library for performing " \
|
||||||
|
"reflection on SPIR-V and disassembling SPIR-V back to high level languages."
|
||||||
|
license = "Apache-2.0"
|
||||||
|
topics = ("reflection", "disassembler", "spirv", "spir-v", "glsl", "hlsl")
|
||||||
|
homepage = "https://github.com/KhronosGroup/SPIRV-Cross"
|
||||||
|
url = "https://github.com/conan-io/conan-center-index"
|
||||||
|
|
||||||
|
package_type = "library"
|
||||||
|
settings = "os", "arch", "compiler", "build_type"
|
||||||
|
options = {
|
||||||
|
"shared": [True, False],
|
||||||
|
"fPIC": [True, False],
|
||||||
|
"build_executable": [True, False],
|
||||||
|
"exceptions": [True, False],
|
||||||
|
"glsl": [True, False],
|
||||||
|
"hlsl": [True, False],
|
||||||
|
"msl": [True, False],
|
||||||
|
"cpp": [True, False],
|
||||||
|
"reflect": [True, False],
|
||||||
|
"c_api": [True, False],
|
||||||
|
"util": [True, False],
|
||||||
|
"namespace": ["ANY"],
|
||||||
|
}
|
||||||
|
default_options = {
|
||||||
|
"shared": False,
|
||||||
|
"fPIC": True,
|
||||||
|
"build_executable": True,
|
||||||
|
"exceptions": True,
|
||||||
|
"glsl": True,
|
||||||
|
"hlsl": True,
|
||||||
|
"msl": True,
|
||||||
|
"cpp": True,
|
||||||
|
"reflect": True,
|
||||||
|
"c_api": True,
|
||||||
|
"util": True,
|
||||||
|
"namespace": "spirv_cross",
|
||||||
|
}
|
||||||
|
|
||||||
|
def export_sources(self):
|
||||||
|
export_conandata_patches(self)
|
||||||
|
|
||||||
|
def config_options(self):
|
||||||
|
if self.settings.os == "Windows":
|
||||||
|
del self.options.fPIC
|
||||||
|
|
||||||
|
def configure(self):
|
||||||
|
if self.options.shared:
|
||||||
|
self.options.rm_safe("fPIC")
|
||||||
|
# these options don't contribute to shared binary
|
||||||
|
del self.options.c_api
|
||||||
|
del self.options.util
|
||||||
|
|
||||||
|
def layout(self):
|
||||||
|
cmake_layout(self, src_folder="src")
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
if not self.options.glsl and \
|
||||||
|
(self.options.hlsl or self.options.msl or self.options.cpp or self.options.reflect):
|
||||||
|
raise ConanInvalidConfiguration("hlsl, msl, cpp and reflect require glsl enabled")
|
||||||
|
|
||||||
|
if self.options.build_executable and \
|
||||||
|
not (self.options.glsl and self.options.hlsl and self.options.msl and
|
||||||
|
self.options.cpp and self.options.reflect and self.options.get_safe("util", True)):
|
||||||
|
raise ConanInvalidConfiguration("executable can't be built without glsl, hlsl, msl, cpp, reflect and util")
|
||||||
|
|
||||||
|
def source(self):
|
||||||
|
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
|
||||||
|
def generate(self):
|
||||||
|
tc = CMakeToolchain(self)
|
||||||
|
tc.variables["SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS"] = not self.options.exceptions
|
||||||
|
tc.variables["SPIRV_CROSS_SHARED"] = self.options.shared
|
||||||
|
tc.variables["SPIRV_CROSS_STATIC"] = not self.options.shared or self.options.build_executable
|
||||||
|
tc.variables["SPIRV_CROSS_CLI"] = self.options.build_executable
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_TESTS"] = False
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_GLSL"] = self.options.glsl
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_HLSL"] = self.options.hlsl
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_MSL"] = self.options.msl
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_CPP"] = self.options.cpp
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_REFLECT"] = self.options.reflect
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_C_API"] = self.options.get_safe("c_api", True)
|
||||||
|
tc.variables["SPIRV_CROSS_ENABLE_UTIL"] = self.options.get_safe("util", False) or self.options.build_executable
|
||||||
|
tc.variables["SPIRV_CROSS_SKIP_INSTALL"] = False
|
||||||
|
tc.variables["SPIRV_CROSS_FORCE_PIC"] = self.options.get_safe("fPIC", True)
|
||||||
|
tc.variables["SPIRV_CROSS_NAMESPACE_OVERRIDE"] = self.options.namespace
|
||||||
|
tc.generate()
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
apply_conandata_patches(self)
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.configure()
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def package(self):
|
||||||
|
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.install()
|
||||||
|
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
|
||||||
|
rmdir(self, os.path.join(self.package_folder, "share"))
|
||||||
|
rm(self, "*.ilk", os.path.join(self.package_folder, "bin"))
|
||||||
|
rm(self, "*.pdb", os.path.join(self.package_folder, "bin"))
|
||||||
|
if self.options.shared and self.options.build_executable:
|
||||||
|
for static_lib in [
|
||||||
|
"spirv-cross-core", "spirv-cross-glsl", "spirv-cross-hlsl", "spirv-cross-msl",
|
||||||
|
"spirv-cross-cpp", "spirv-cross-reflect", "spirv-cross-c", "spirv-cross-util",
|
||||||
|
]:
|
||||||
|
rm(self, f"*{static_lib}.*", os.path.join(self.package_folder, "lib"))
|
||||||
|
|
||||||
|
# TODO: to remove in conan v2 once legacy generators removed
|
||||||
|
self._create_cmake_module_alias_targets(
|
||||||
|
os.path.join(self.package_folder, self._module_file_rel_path),
|
||||||
|
{target: f"spirv-cross::{target}" for target in self._spirv_cross_components.keys()},
|
||||||
|
)
|
||||||
|
|
||||||
|
def _create_cmake_module_alias_targets(self, module_file, targets):
|
||||||
|
content = ""
|
||||||
|
for alias, aliased in targets.items():
|
||||||
|
content += textwrap.dedent(f"""\
|
||||||
|
if(TARGET {aliased} AND NOT TARGET {alias})
|
||||||
|
add_library({alias} INTERFACE IMPORTED)
|
||||||
|
set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased})
|
||||||
|
endif()
|
||||||
|
""")
|
||||||
|
save(self, module_file, content)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _module_file_rel_path(self):
|
||||||
|
return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _spirv_cross_components(self):
|
||||||
|
components = {}
|
||||||
|
if self.options.shared:
|
||||||
|
components.update({"spirv-cross-c-shared": []})
|
||||||
|
else:
|
||||||
|
components.update({"spirv-cross-core": []})
|
||||||
|
if self.options.glsl:
|
||||||
|
components.update({"spirv-cross-glsl": ["spirv-cross-core"]})
|
||||||
|
if self.options.hlsl:
|
||||||
|
components.update({"spirv-cross-hlsl": ["spirv-cross-glsl"]})
|
||||||
|
if self.options.msl:
|
||||||
|
components.update({"spirv-cross-msl": ["spirv-cross-glsl"]})
|
||||||
|
if self.options.cpp:
|
||||||
|
components.update({"spirv-cross-cpp": ["spirv-cross-glsl"]})
|
||||||
|
if self.options.reflect:
|
||||||
|
components.update({"spirv-cross-reflect": []})
|
||||||
|
if self.options.c_api:
|
||||||
|
c_api_requires = []
|
||||||
|
if self.options.glsl:
|
||||||
|
c_api_requires.append("spirv-cross-glsl")
|
||||||
|
if self.options.hlsl:
|
||||||
|
c_api_requires.append("spirv-cross-hlsl")
|
||||||
|
if self.options.msl:
|
||||||
|
c_api_requires.append("spirv-cross-msl")
|
||||||
|
if self.options.cpp:
|
||||||
|
c_api_requires.append("spirv-cross-cpp")
|
||||||
|
if self.options.reflect:
|
||||||
|
c_api_requires.append("spirv-cross-reflect")
|
||||||
|
components.update({"spirv-cross-c": c_api_requires})
|
||||||
|
if self.options.util:
|
||||||
|
components.update({"spirv-cross-util": ["spirv-cross-core"]})
|
||||||
|
return components
|
||||||
|
|
||||||
|
def package_info(self):
|
||||||
|
# FIXME: we should provide one CMake config file per target (waiting for an implementation of https://github.com/conan-io/conan/issues/9000)
|
||||||
|
def _register_component(target_lib, requires):
|
||||||
|
self.cpp_info.components[target_lib].set_property("cmake_target_name", target_lib)
|
||||||
|
if self.options.shared:
|
||||||
|
self.cpp_info.components[target_lib].set_property("pkg_config_name", target_lib)
|
||||||
|
prefix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else ""
|
||||||
|
self.cpp_info.components[target_lib].libs = [f"{target_lib}{prefix}"]
|
||||||
|
self.cpp_info.components[target_lib].includedirs.append(os.path.join("include", "spirv_cross"))
|
||||||
|
self.cpp_info.components[target_lib].defines.append(f"SPIRV_CROSS_NAMESPACE_OVERRIDE={self.options.namespace}")
|
||||||
|
self.cpp_info.components[target_lib].requires = requires
|
||||||
|
if self.settings.os in ["Linux", "FreeBSD"] and self.options.glsl:
|
||||||
|
self.cpp_info.components[target_lib].system_libs.append("m")
|
||||||
|
if not self.options.shared and self.options.c_api:
|
||||||
|
libcxx = stdcpp_library(self)
|
||||||
|
if libcxx:
|
||||||
|
self.cpp_info.components[target_lib].system_libs.append(libcxx)
|
||||||
|
|
||||||
|
# TODO: to remove in conan v2 once legacy generators removed
|
||||||
|
self.cpp_info.components[target_lib].names["cmake_find_package"] = target_lib
|
||||||
|
self.cpp_info.components[target_lib].names["cmake_find_package_multi"] = target_lib
|
||||||
|
self.cpp_info.components[target_lib].build_modules["cmake_find_package"] = [self._module_file_rel_path]
|
||||||
|
self.cpp_info.components[target_lib].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path]
|
||||||
|
|
||||||
|
for target_lib, requires in self._spirv_cross_components.items():
|
||||||
|
_register_component(target_lib, requires)
|
||||||
|
|
||||||
|
# TODO: to remove in conan v2 once legacy generators removed
|
||||||
|
if self.options.build_executable:
|
||||||
|
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
|
||||||
12
spirv-cross/all/test_package/CMakeLists.txt
Normal file
12
spirv-cross/all/test_package/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
project(test_package LANGUAGES C)
|
||||||
|
|
||||||
|
# FIXME: this is not the official way to find spirv-cross components
|
||||||
|
find_package(spirv-cross REQUIRED CONFIG)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} test_package.c)
|
||||||
|
if(TARGET spirv-cross-c)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE spirv-cross-c)
|
||||||
|
elseif(TARGET spirv-cross-c-shared)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE spirv-cross-c-shared)
|
||||||
|
endif()
|
||||||
26
spirv-cross/all/test_package/conanfile.py
Normal file
26
spirv-cross/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
from conan import ConanFile
|
||||||
|
from conan.tools.build import can_run
|
||||||
|
from conan.tools.cmake import CMake, cmake_layout
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
class TestPackageConan(ConanFile):
|
||||||
|
settings = "os", "arch", "compiler", "build_type"
|
||||||
|
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
||||||
|
test_type = "explicit"
|
||||||
|
|
||||||
|
def layout(self):
|
||||||
|
cmake_layout(self)
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
self.requires(self.tested_reference_str)
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
cmake = CMake(self)
|
||||||
|
cmake.configure()
|
||||||
|
cmake.build()
|
||||||
|
|
||||||
|
def test(self):
|
||||||
|
if can_run(self):
|
||||||
|
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||||
|
self.run(bin_path, env="conanrun")
|
||||||
15
spirv-cross/all/test_package/test_package.c
Normal file
15
spirv-cross/all/test_package/test_package.c
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#include <spirv_cross_c.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
spvc_context context;
|
||||||
|
spvc_context_create(&context);
|
||||||
|
spvc_context_destroy(context);
|
||||||
|
|
||||||
|
unsigned major, minor, patch;
|
||||||
|
spvc_get_version(&major, &minor, &patch);
|
||||||
|
printf("SPIRV-Cross: C API version %u.%u.%u\n", major, minor, patch);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
spirv-cross/config.yml
Normal file
25
spirv-cross/config.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
versions:
|
||||||
|
"1.4.341.0":
|
||||||
|
folder: all
|
||||||
|
"1.4.321.0":
|
||||||
|
folder: all
|
||||||
|
"1.4.313.0":
|
||||||
|
folder: all
|
||||||
|
"1.4.309.0":
|
||||||
|
folder: all
|
||||||
|
"1.3.296.0":
|
||||||
|
folder: all
|
||||||
|
"1.3.268.0":
|
||||||
|
folder: all
|
||||||
|
"1.3.261.1":
|
||||||
|
folder: all
|
||||||
|
"1.3.250.1":
|
||||||
|
folder: all
|
||||||
|
"1.3.246.1":
|
||||||
|
folder: all
|
||||||
|
"1.3.243.0":
|
||||||
|
folder: all
|
||||||
|
"1.3.239.0":
|
||||||
|
folder: all
|
||||||
|
"cci.20211113":
|
||||||
|
folder: all
|
||||||
Reference in New Issue
Block a user