build: Fix glfw linking
This commit is contained in:
parent
adcaad791a
commit
e84b8cb96d
7
lib/third_party/imgui/custom/CMakeLists.txt
vendored
7
lib/third_party/imgui/custom/CMakeLists.txt
vendored
@ -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})
|
||||
target_link_libraries(imgui_custom PUBLIC ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES})
|
Loading…
x
Reference in New Issue
Block a user