diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index e7a03797..bd230010 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -13,6 +13,7 @@ if (MSVC OR CMAKE_C_SIMULATE_ID STREQUAL "MSVC") endif() if (WIN32) + link_libraries(imm32) set(ICON glfw.rc) elseif (APPLE) set(ICON glfw.icns) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5ea347e6..cc445010 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -153,8 +153,7 @@ if (CMAKE_VERSION VERSION_LESS "3.16" AND APPLE) endif() if (GLFW_BUILD_WIN32) - list(APPEND glfw_PKG_LIBS "-lgdi32") - list(APPEND glfw_LIBRARIES "imm32") + list(APPEND glfw_PKG_LIBS "-lgdi32 -limm32") endif() if (GLFW_BUILD_COCOA) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f81cfeb9..d54a5b0a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,6 +3,10 @@ link_libraries(glfw) include_directories("${GLFW_SOURCE_DIR}/deps") +if (WIN32) + link_libraries(imm32) +endif() + if (MATH_LIBRARY) link_libraries("${MATH_LIBRARY}") endif()