summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-10-25 01:12:16 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2011-10-25 01:12:16 +0200
commit08115a80e5c5c150ff39813e61f57619a323fa53 (patch)
tree57726587f4c4ae7b6a2b249cf184c0ca1a62b4c8 /CMakeLists.txt
parentacf27225b5e971bb201b457b4704515f716ca7d2 (diff)
downloadmariadb-git-08115a80e5c5c150ff39813e61f57619a323fa53.tar.gz
Fix debug build on Windows.
Checking for WITH_DEBUG does not work, as described in CMake MySQL wiki http://forge.mysql.com/wiki/CMake#Debug-only_options Excluding directory completely for certain build types works for Makefiles only, but not for Visual Studio and not for Xcode.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac632770229..5fd951584e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -285,10 +285,12 @@ SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
ENDIF()
ADD_SUBDIRECTORY(include)
-IF(WITH_DEBUG)
- ADD_SUBDIRECTORY(dbug)
+IF(CMAKE_GENERATOR MATCHES "Makefiles" AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
+ SET(DBUG_LIBRARY)
+ELSE()
SET(DBUG_LIBRARY dbug)
-ENDIF(WITH_DEBUG)
+ ADD_SUBDIRECTORY(dbug)
+ENDIF()
ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(regex)