From 3f34b091b813a1bbb8ed3370d1afe0dfee379ddd Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 16 Aug 2012 19:23:54 +0200 Subject: [PATCH] Gave MinGW link library a .a suffix. --- src/CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f204a639..5e735991 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,10 +40,13 @@ if (BUILD_SHARED_LIBS) if (_GLFW_WIN32_WGL) # The GLFW DLL needs a special compile-time macro and import library name - set_target_properties(glfw PROPERTIES - PREFIX "" - IMPORT_PREFIX "" - IMPORT_SUFFIX "dll.lib") + set_target_properties(glfw PROPERTIES PREFIX "" IMPORT_PREFIX "") + + if (MINGW) + set_target_properties(glfw PROPERTIES IMPORT_SUFFIX "dll.a") + else() + set_target_properties(glfw PROPERTIES IMPORT_SUFFIX "dll.lib") + endif() elseif (_GLFW_COCOA_NSGL) # Append -fno-common to the compile flags to work around a bug in the Apple GCC get_target_property(glfw_CFLAGS glfw COMPILE_FLAGS)