Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (IMGUI_SFML_FIND_SFML)
find_package(SFML 2.5 COMPONENTS graphics system window)

if(NOT SFML_FOUND)
message(FATAL_ERROR "SFML 2 directory not found. Set SFML_DIR to directory where SFML was built (or one which ccontains SFMLConfig.cmake)")
message(FATAL_ERROR "SFML 2 directory not found. Set SFML_DIR to directory where SFML was built (or one which contains SFMLConfig.cmake)")
endif()
endif()

Expand Down Expand Up @@ -131,6 +131,12 @@ target_compile_definitions(ImGui-SFML
IMGUI_USER_CONFIG="${IMGUI_SFML_CONFIG_NAME}"
)

if(MSVC)
target_compile_options(ImGui-SFML PRIVATE /W3)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
target_compile_options(ImGui-SFML PRIVATE -Werror -Wall -Wextra -Wpedantic -Wshadow)
endif()

if(WIN32 AND MINGW)
target_link_libraries(ImGui-SFML PUBLIC imm32)
endif()
Expand Down
4 changes: 4 additions & 0 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include <memory>
#include <vector>

#if defined(__APPLE__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

#if SFML_VERSION_MAJOR >= 3
#define IMGUI_SFML_KEY_APOSTROPHE sf::Keyboard::Apostrophe
#define IMGUI_SFML_KEY_GRAVE sf::Keyboard::Grave
Expand Down