diff --git a/scripts/install_scripts.cmake.in b/scripts/install_scripts.cmake.in index f2f64351469..5a590d15b74 100644 --- a/scripts/install_scripts.cmake.in +++ b/scripts/install_scripts.cmake.in @@ -2,8 +2,16 @@ SET(CMAKE_SYSTEM_NAME @CMAKE_SYSTEM_NAME@) SET(UNIX @UNIX@) SET(WIN32 @WIN32@) SET(MSVC @MSVC@) -SET(CFLAGS "@CMAKE_C_FLAGS_RELWITHDEBINFO@") -SET(CXXFLAGS "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@") +SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@") +IF(CMAKE_GENERATOR MATCHES "Makefiles") + # No multiconfig build - use CMAKE_C_FLAGS + SET(CFLAGS "@CMAKE_C_FLAGS@") + SET(CXXFLAGS "@CMAKE_CXX_FLAGS@") +ELSE() + # Multiconfig build - use CMAKE_C_FLAGS_RELWITHDEBINFO + SET(CFLAGS "@CMAKE_C_FLAGS_RELWITHDEBINFO@") + SET(CXXFLAGS "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@") +ENDIF() SET(LDFLAGS "@CMAKE_SHARED_LIBRARY_LINK_FLAGS@") SET(mysqlclient_LIB_DEPENDS "@mysqlclient_LIB_DEPENDS@") SET(mysqlserver_LIB_DEPENDS "@mysqlserver_LIB_DEPENDS@")