diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c01dd3d..b4a6a75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: -DIMGUI_SFML_BUILD_EXAMPLES=ON \ -DIMGUI_SFML_BUILD_TESTING=ON \ -DIMGUI_SFML_ENABLE_WARNINGS=ON \ + -DIMGUI_SFML_DISABLE_OBSOLETE_FUNCTIONS=ON \ ${{matrix.platform.flags}} \ ${{matrix.config.flags}} diff --git a/CMakeLists.txt b/CMakeLists.txt index 750f537..0dc00a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(imgui_sfml VERSION 2.6 LANGUAGES CXX) option(IMGUI_SFML_FIND_SFML "Use find_package to find SFML" ON) option(IMGUI_SFML_IMGUI_DEMO "Build imgui_demo.cpp" ON) option(IMGUI_SFML_ENABLE_WARNINGS "Enable compiler warnings" OFF) +option(IMGUI_SFML_DISABLE_OBSOLETE_FUNCTIONS "Disable obsolute ImGui functions" OFF) # If you want to use your own user config when compiling ImGui, please set the following variables # For example, if you have your config in /path/to/dir/with/config/myconfig.h, set the variables as follows: @@ -84,6 +85,9 @@ if(BUILD_SHARED_LIBS) set_target_properties(ImGui-SFML PROPERTIES DEFINE_SYMBOL "IMGUI_SFML_EXPORTS") set_target_properties(ImGui-SFML PROPERTIES DEBUG_POSTFIX "_d") endif() +if(IMGUI_SFML_DISABLE_OBSOLETE_FUNCTIONS) + target_compile_definitions(ImGui-SFML PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS) +endif() # Add compiler warnings if(IMGUI_SFML_ENABLE_WARNINGS)