diff --git a/lib/third_party/imgui/custom/CMakeLists.txt b/lib/third_party/imgui/custom/CMakeLists.txt index 7ce9b690b..a2e60c94d 100644 --- a/lib/third_party/imgui/custom/CMakeLists.txt +++ b/lib/third_party/imgui/custom/CMakeLists.txt @@ -21,6 +21,11 @@ find_package(OpenGL REQUIRED) find_package(Freetype REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) +# pkgsearch somehow reports the glfw3 library as glfw3dll in Release builds on MinGW which is not correct +if ("${GLFW_LIBRARIES}" MATCHES ".+dll") + set(GLFW_LIBRARIES "glfw3") +endif () + target_include_directories(imgui_custom PUBLIC ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS} ${OpenGL_INCLUDE_DIRS}) target_link_directories(imgui_custom PUBLIC ${FREETYPE_LIBRARY_DIRS} ${GLFW_LIBRARY_DIRS} ${OpenGL_LIBRARY_DIRS}) -target_link_libraries(imgui_custom PUBLIC glfw3 ${OPENGL_LIBRARIES}) \ No newline at end of file +target_link_libraries(imgui_custom PUBLIC ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES}) \ No newline at end of file