diff --git a/CMake/README.txt b/CMake/README.txt index 9581f832..96ac1905 100644 --- a/CMake/README.txt +++ b/CMake/README.txt @@ -11,7 +11,7 @@ To use these files you add a special parameter when configuring the source tree: For example, to use the Debian GNU/Linux MinGW package, run CMake like this: - cmake -DCMAKE_TOOLCHAIN_FILE=CMake/linux-i586-mingw32msvc.cmake . + cmake -DCMAKE_TOOLCHAIN_FILE=CMake/i586-mingw32msvc.cmake . For more details see this article: diff --git a/CMake/linux-amd64-mingw32msvc.cmake b/CMake/amd64-mingw32msvc.cmake similarity index 100% rename from CMake/linux-amd64-mingw32msvc.cmake rename to CMake/amd64-mingw32msvc.cmake diff --git a/CMake/linux-i586-mingw32msvc.cmake b/CMake/i586-mingw32msvc.cmake similarity index 100% rename from CMake/linux-i586-mingw32msvc.cmake rename to CMake/i586-mingw32msvc.cmake diff --git a/CMake/linux-i686-pc-mingw32.cmake b/CMake/i686-pc-mingw32.cmake similarity index 100% rename from CMake/linux-i686-pc-mingw32.cmake rename to CMake/i686-pc-mingw32.cmake diff --git a/CMake/cygwin-i686-w64-mingw32.cmake b/CMake/i686-w64-mingw32.cmake similarity index 100% rename from CMake/cygwin-i686-w64-mingw32.cmake rename to CMake/i686-w64-mingw32.cmake diff --git a/CMake/cygwin-x86_64-w64-mingw32.cmake b/CMake/x86_64-w64-mingw32.cmake similarity index 100% rename from CMake/cygwin-x86_64-w64-mingw32.cmake rename to CMake/x86_64-w64-mingw32.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 44dcb4d4..b80ac24e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,21 @@ if (_GLFW_WIN32_WGL) list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY}) + if (MSVC) + option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON) + + if (NOT USE_MSVC_RUNTIME_LIBRARY_DLL) + foreach (flag CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) + if (${flag} MATCHES "/MD") + string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}") + endif() + if (${flag} MATCHES "/MDd") + string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}") + endif() + endforeach() + endif() + endif() + set(_GLFW_NO_DLOAD_WINMM ${BUILD_SHARED_LIBS}) if (BUILD_SHARED_LIBS) @@ -178,7 +193,7 @@ if (_GLFW_COCOA_NSGL) set(CMAKE_OSX_ARCHITECTURES ppc;i386;ppc64;x86_64) set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) set(CMAKE_C_FLAGS "-mmacosx-version-min=10.5") - else(GLFW_BUILD_UNIVERSAL) + else() message(STATUS "Building GLFW only for the native architecture") endif() diff --git a/readme.html b/readme.html index 3ef85423..789ac5ff 100644 --- a/readme.html +++ b/readme.html @@ -335,7 +335,7 @@ version of GLFW.
GLX_EXT_swap_control
extension as an alternative to GLX_SGI_swap_control
GLX_EXT_swap_control
and GLX_MESA_swap_control
extensions as alternatives to GLX_SGI_swap_control
CLOCK_MONOTONIC
time source as the preferred method_NET_WM_NAME
and _NET_WM_ICON_NAME
EWMH window properties