Commit fb8818c1 authored by Sergei Golubchik's avatar Sergei Golubchik

Fix CMakeLists.txt for cmake Ninja generator

parent dc64ba21
......@@ -312,7 +312,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
ENDIF()
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}" debug_target_location "${target_location}")
ELSE()
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" )
......
......@@ -108,7 +108,7 @@ MACRO(MYSQL_ADD_PLUGIN)
# Build either static library or module
IF (WITH_${plugin} AND NOT ARG_MODULE_ONLY)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
# If there is a shared library from previous shared build,
# remove it. This is done just for mysql-test-run.pl
# so it does not try to use stale shared lib as plugin
......
......@@ -88,7 +88,7 @@ IF(MALLOC_LIB)
INSTALL(FILES ${MALLOC_LIB} DESTINATION ${INSTALL_LIBDIR} OPTIONAL)
ENDIF()
IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
# Strip maintainer mode options if necessary
STRING(REPLACE "${MY_MAINTAINER_C_WARNINGS}" "" CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
STRING(REPLACE "${MY_MAINTAINER_CXX_WARNINGS}" "" CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment