Module: Demos Branch: master Commit: 93c987197a8aa41acf6dcf4f818f94ef48959bb2 URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=93c987197a8aa41acf6dcf4f818f94ef48959bb2
Author: José Fonseca <jfons...@vmware.com> Date: Wed Jun 12 16:27:31 2013 +0100 cmake: Use static runtime for MSVC builds too. Just like for MinGW. So that we don't need to install MSVC redistributables when running the demos on a fresh installed machine. --- CMakeLists.txt | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9340b4e..2402d1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,17 @@ if (MSVC) add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) add_definitions (-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) add_definitions (-wd4244) # conversion' conversion from 'type1' to 'type2', possible loss of data + + # Use static runtime + # http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F + foreach (flag_var + CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO + ) + if (${flag_var} MATCHES "/MD") + string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + endif () + endforeach (flag_var) endif (MSVC) if (MINGW) _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit