1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00
imgui/examples/imgui_impl_sdl.cmake
2025-05-02 17:25:00 +02:00

19 lines
671 B
CMake

find_package (SDL2 QUIET)
if (SDL2_DIR)
add_library (imgui-sdl OBJECT
"${CMAKE_CURRENT_LIST_DIR}/imgui_impl_sdl.cpp"
)
target_link_libraries (imgui-sdl PUBLIC imgui sdl2)
target_include_directories (imgui-sdl PUBLIC "${CMAKE_CURRENT_LIST_DIR}")
# Fixes a strange inclusion problem on MacOS due to an unconventional
# SDL installation with Homebrew. Innocuous if SDL is being pulled in
# from somewhere else.
if (APPLE)
target_include_directories (imgui-sdl SYSTEM PUBLIC "/usr/local/include/SDL2")
endif ()
else ()
message (WARNING "IMGUI_IMPL_SDL set to ON but SDL2 not found on system or in project")
endif ()