summaryrefslogtreecommitdiff
blob: 9bed7a59f1b970c3269df71e5096bb9242b71a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
diff -aurN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2015-07-09 09:04:00.118091000 -0400
+++ b/CMakeLists.txt	2015-07-09 09:17:06.291091000 -0400
@@ -405,8 +405,6 @@
 MYSQL_CHECK_ZLIB_WITH_COMPRESS()
 # Add bundled yassl/taocrypt or system openssl.
 MYSQL_CHECK_SSL()
-# Add system/bundled editline.
-MYSQL_CHECK_EDITLINE()
 # Add libevent
 MYSQL_CHECK_LIBEVENT()
 
@@ -436,7 +434,10 @@
   ADD_SUBDIRECTORY(storage/ndb)
 ENDIF()
 
-ADD_SUBDIRECTORY(include)
+IF(NOT WITHOUT_CLIENTLIBS)
+  ADD_SUBDIRECTORY(include)
+ENDIF(NOT WITHOUT_CLIENTLIBS)
+
 ADD_SUBDIRECTORY(dbug)
 ADD_SUBDIRECTORY(strings)
 ADD_SUBDIRECTORY(vio)
@@ -462,7 +463,6 @@
 ENDIF()
 
 ADD_SUBDIRECTORY(extra)
-ADD_SUBDIRECTORY(client)
 ADD_SUBDIRECTORY(sql/share)
 ADD_SUBDIRECTORY(libservices)
 
@@ -470,11 +470,20 @@
   ADD_SUBDIRECTORY(man)
 ENDIF()
 
+IF(NOT WITHOUT_TOOLS)
+  # Add system/bundled editline
+  MYSQL_CHECK_EDITLINE()
+  ADD_SUBDIRECTORY(client)
+ENDIF(NOT WITHOUT_TOOLS)
+
 IF(NOT WITHOUT_SERVER)
   ADD_SUBDIRECTORY(testclients)
   ADD_SUBDIRECTORY(sql)
   OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF)
   IF(WITH_EMBEDDED_SERVER) 
+   IF(WITHOUT_TOOLS)
+     MYSQL_CHECK_EDITLINE()
+   ENDIF(WITHOUT_TOOLS)
    ADD_SUBDIRECTORY(libmysqld)
    ADD_SUBDIRECTORY(libmysqld/examples)
   ENDIF(WITH_EMBEDDED_SERVER)
diff -aurN a/extra/CMakeLists.txt b/extra/CMakeLists.txt
--- a/extra/CMakeLists.txt	2015-05-05 07:05:53.000000000 -0400
+++ b/extra/CMakeLists.txt	2015-07-09 09:18:16.982091000 -0400
@@ -59,15 +59,16 @@
   ADD_DEPENDENCIES(GenError copy_openssl_extra)
 ENDIF()
 
+IF(NOT WITHOUT_CLIENTLIBS)
+  MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
+  TARGET_LINK_LIBRARIES(my_print_defaults  mysys mysys_ssl)
+  SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX)
 
-MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
-TARGET_LINK_LIBRARIES(my_print_defaults  mysys mysys_ssl)
-SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX)
-
-MYSQL_ADD_EXECUTABLE(perror perror.c)
-ADD_DEPENDENCIES(perror GenError)
-TARGET_LINK_LIBRARIES(perror mysys mysys_ssl)
-SET_TARGET_PROPERTIES(perror PROPERTIES LINKER_LANGUAGE CXX)
+  MYSQL_ADD_EXECUTABLE(perror perror.c)
+  ADD_DEPENDENCIES(perror GenError)
+  TARGET_LINK_LIBRARIES(perror mysys mysys_ssl)
+  SET_TARGET_PROPERTIES(perror PROPERTIES LINKER_LANGUAGE CXX)
+ENDIF(NOT WITHOUT_CLIENTLIBS)
 
 MYSQL_ADD_EXECUTABLE(resolveip resolveip.c)
 TARGET_LINK_LIBRARIES(resolveip mysys mysys_ssl)
diff -aurN a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
--- a/libmysql/CMakeLists.txt	2015-07-09 09:04:01.217091000 -0400
+++ b/libmysql/CMakeLists.txt	2015-07-09 09:22:47.903091000 -0400
@@ -217,6 +217,6 @@
 ENDIF()
 
-IF(NOT DISABLE_SHARED)
+IF(NOT DISABLE_SHARED AND NOT WITHOUT_CLIENTLIBS)
   # Merge several convenience libraries into one big mysqlclient
   # and link them together into shared library.
   MERGE_LIBRARIES(libmysql SHARED ${LIBS}
diff -aurN a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
--- a/scripts/CMakeLists.txt	2015-07-09 09:04:00.401091000 -0400
+++ b/scripts/CMakeLists.txt	2015-07-09 09:20:25.723091000 -0400
@@ -433,18 +433,21 @@

   IF(WITH_SYSTEMD)
     SET(BIN_SCRIPTS
-      mysql_config
       mysqldumpslow
       )
   ELSE()
     SET(BIN_SCRIPTS
-      mysql_config
       mysqldumpslow
       mysqld_multi
       mysqld_safe
       )
   ENDIF()
-
+  IF(NOT WITHOUT_CLIENTLIBS)
+    SET(BIN_SCRIPTS
+      ${BIN_SCRIPTS}
+      mysql_config
+    )
+  ENDIF(NOT WITHOUT_CLIENTLIBS)
   SET(PKGCONFIG_FILE ${LIBMYSQL_OS_OUTPUT_NAME}.pc)
   STRING(REGEX REPLACE "/mysql$" "" PKGCONFIG_DIR "${INSTALL_LIBDIR}")
   SET(PKGCONFIG_DIR "${PKGCONFIG_DIR}/pkgconfig")