Skip to content

Commit 188d5d1

Browse files
committed
Add option to disable obsolete ImGui functions
1 parent 87b9ed9 commit 188d5d1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
-DIMGUI_SFML_BUILD_EXAMPLES=ON \
9393
-DIMGUI_SFML_BUILD_TESTING=ON \
9494
-DIMGUI_SFML_ENABLE_WARNINGS=ON \
95+
-DIMGUI_SFML_DISABLE_OBSOLETE_FUNCTIONS=ON \
9596
${{matrix.platform.flags}} \
9697
${{matrix.config.flags}}
9798

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ project(imgui_sfml VERSION 2.6 LANGUAGES CXX)
44
option(IMGUI_SFML_FIND_SFML "Use find_package to find SFML" ON)
55
option(IMGUI_SFML_IMGUI_DEMO "Build imgui_demo.cpp" ON)
66
option(IMGUI_SFML_ENABLE_WARNINGS "Enable compiler warnings" OFF)
7+
option(IMGUI_SFML_DISABLE_OBSOLETE_FUNCTIONS "Disable obsolete ImGui functions" OFF)
78

89
# If you want to use your own user config when compiling ImGui, please set the following variables
910
# 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)
8485
set_target_properties(ImGui-SFML PROPERTIES DEFINE_SYMBOL "IMGUI_SFML_EXPORTS")
8586
set_target_properties(ImGui-SFML PROPERTIES DEBUG_POSTFIX "_d")
8687
endif()
88+
if(IMGUI_SFML_DISABLE_OBSOLETE_FUNCTIONS)
89+
target_compile_definitions(ImGui-SFML PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS)
90+
endif()
8791

8892
# Add compiler warnings
8993
if(IMGUI_SFML_ENABLE_WARNINGS)

0 commit comments

Comments
 (0)