nostalgia/deps/imgui/CMakeLists.txt

46 lines
739 B
CMake
Raw Normal View History

2021-05-16 13:04:32 -05:00
add_library(
imgui-glfw
src/imgui_impl_glfw.cpp
src/imgui_impl_opengl3.cpp
)
find_package(glfw3 REQUIRED)
find_package(imgui REQUIRED)
if(APPLE)
target_compile_definitions(
imgui-glfw PRIVATE
IMGUI_IMPL_OPENGL_LOADER_CUSTOM="OpenGL/gl3.h"
)
2021-07-08 01:41:05 -05:00
else()
target_compile_definitions(
imgui-glfw PRIVATE
IMGUI_IMPL_OPENGL_LOADER_CUSTOM="GLES3/gl3.h"
)
2021-05-16 13:04:32 -05:00
endif()
target_link_libraries(
imgui-glfw PUBLIC
${OPENGL_gl_LIBRARY}
glfw::glfw
imgui::imgui
)
if(NOT MSVC)
target_compile_options(
imgui-glfw PRIVATE
-Wno-all
-Wno-extra
-Wno-old-style-cast
-Wno-deprecated-declarations
)
endif()
install(
TARGETS
imgui-glfw
DESTINATION
LIBRARY DESTINATION lib/nostalgia
ARCHIVE DESTINATION lib/nostalgia
)