Skip to content

Commit

Permalink
Add option to disable obsolete ImGui functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Nov 1, 2024
1 parent 87b9ed9 commit 188d5d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 obsolete 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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 188d5d1

Please sign in to comment.