diff --git a/CMakeLists.txt b/CMakeLists.txt index bff1732..153ef3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1) project(imgui_sfml LANGUAGES CXX - VERSION 2.2 + VERSION 2.3 ) # In CMake 3.12+ this policy will automatically take the ImGui_ROOT and SFML_ROOT environment variables diff --git a/README.md b/README.md index a77d798..a5b8d37 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -ImGui-SFML v2.2 +ImGui-SFML v2.3 ======= [![build Actions Status](https://github.com/eliasdaler/imgui-sfml/workflows/build/badge.svg)](https://github.com/eliasdaler/imgui-sfml/actions) @@ -64,9 +64,9 @@ Integrating into your project manually - Add `imgui-SFML.cpp` to your build/project - Link OpenGL if you get linking errors -Other ways to add to your project(won't recommend as the versions tend to lag behind and are not +Other ways to add to your project(won't recommend as the versions tend to lag behind and are not --- -Not recommended, as they're not maintained officially. Tend to lag behind and stay on older versions. +Not recommended, as they're not maintained officially. Tend to lag behind and stay on older versions. - [Conan](https://github.com/bincrafters/community/tree/main/recipes/imgui-sfml) - [vcpkg](https://github.com/microsoft/vcpkg/tree/master/ports/imgui-sfml) diff --git a/conanfile.py b/conanfile.py deleted file mode 100644 index 1632c7d..0000000 --- a/conanfile.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import os.path -from conans import ConanFile, CMake -from conans.tools import Git -from conans.errors import ConanInvalidConfiguration - -class ImguiSfmlConan(ConanFile): - """ Imgui-SFML library conan file. - - Options: - - * shared: True or False - Whether to build this library shared or static. - - * fPIC: True or False - Whether or not to use -fPIC option while building. - - * imconfig: None or String - Use 'None' if you want this library to provide default - ImGui's imconfig.h file. Otherwise, provide a path to the - imconfig.h file you want to include in the build. - - * imconfig_install_folder: None or String - Use 'None' if you want this build to include custom config - file, otherwise specify the directory where your imconfig - will be installed. - - * imgui_revision: String - Tag or branch of ImGui repository that should be used with - ImGui-SFML. - """ - - name = 'imgui-sfml' - version = '2.1' - description = 'ImGui binding for use with SFML' - topics = ('conan', 'sfml', 'gui', 'imgui') - url = 'https://github.com/eliasdaler/imgui-sfml' - homepage = 'https://github.com/eliasdaler/imgui-sfml' - author = 'Elias Daler ' - requires = 'sfml/2.5.1@bincrafters/stable' - license = 'MIT' - settings = 'os', 'compiler', 'build_type', 'arch' - options = { - 'shared': [True, False], - 'fPIC': [True, False], - 'imconfig': 'ANY', - 'imconfig_install_folder': 'ANY', - 'imgui_revision': 'ANY' - } - default_options = { - 'shared': False, - 'fPIC': True, - 'imconfig': None, - 'imconfig_install_folder': None, - 'imgui_revision': 'v1.70' - } - exports_sources = [ - 'cmake/FindImGui.cmake', - 'CMakeLists.txt', - 'imconfig-SFML.h', - 'imgui-SFML.cpp', - 'imgui-SFML_export.h', - 'imgui-SFML.h', - ] - exports = 'LICENSE' - _imgui_dir = 'imgui' - - def source(self): - git = Git(folder=self._imgui_dir) - git.clone('https://github.com/ocornut/imgui.git', str(self.options.imgui_revision)) - - def configure(self): - imconfig = self.options.imconfig - if imconfig: - if not os.path.isfile(str(imconfig)): - raise ConanInvalidConfiguration("Provided user config is not a file or doesn't exist") - else: - self._imconfig_path = os.path.abspath(str(self.options.imconfig)) - if not self.options.imgui_revision: - raise ConanInvalidConfiguration("ImGui revision is empty. Try latest version tag or 'master'") - - self.options['sfml'].graphics = True - self.options['sfml'].window = True - self.options['sfml'].shared = self.options.shared - - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions['IMGUI_DIR'] = os.path.join(self.source_folder, self._imgui_dir) - cmake.definitions['SFML_DIR'] = os.path.join(self.deps_cpp_info['sfml'].lib_paths[0], 'cmake', 'SFML') - cmake.definitions['IMGUI_SFML_BUILD_EXAMPLES'] = 'OFF' - cmake.definitions['IMGUI_SFML_FIND_SFML'] = 'ON' - if self.options.imconfig_install_folder: - cmake.definitions['IMGUI_SFML_CONFIG_INSTALL_DIR'] = self.options.imconfig_install_folder - if self.options.imconfig: - cmake.definitions['IMGUI_SFML_USE_DEFAULT_CONFIG'] = 'OFF' - cmake.definitions['IMGUI_SFML_CONFIG_NAME'] = os.path.basename(self._imconfig_path) - cmake.definitions['IMGUI_SFML_CONFIG_DIR'] = os.path.dirname(self._imconfig_path) - else: - cmake.definitions['IMGUI_SFML_USE_DEFAULT_CONFIG'] = 'ON' - cmake.configure() - return cmake - - def build(self): - cmake = self._configure_cmake() - cmake.build() - - def package(self): - cmake = self._configure_cmake() - cmake.install() - - def package_info(self): - self.cpp_info.libs = ['ImGui-SFML']