forked from mysql/mysql-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (62 loc) · 2.75 KB
/
CMakeLists.txt
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
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ADD_SUBDIRECTORY(harness)
ADD_SUBDIRECTORY(http)
ADD_SUBDIRECTORY(io)
ADD_SUBDIRECTORY(json_schema_embedder)
ADD_SUBDIRECTORY(keepalive)
ADD_SUBDIRECTORY(metadata_cache)
ADD_SUBDIRECTORY(mock_server)
ADD_SUBDIRECTORY(mysql_protocol)
ADD_SUBDIRECTORY(openssl)
ADD_SUBDIRECTORY(plugin_info)
ADD_SUBDIRECTORY(protobuf)
ADD_SUBDIRECTORY(rest_api)
ADD_SUBDIRECTORY(rest_metadata_cache)
ADD_SUBDIRECTORY(rest_router)
ADD_SUBDIRECTORY(rest_routing)
ADD_SUBDIRECTORY(router)
ADD_SUBDIRECTORY(routing)
# Directory layout after 'make install' is different.
# Create symlinks to ssl libraries for both: build and install layouts
IF (APPLE AND HAVE_CRYPTO_DYLIB AND HAVE_OPENSSL_DYLIB)
FILE(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugin_output_directory/mysqlrouter")
ADD_CUSTOM_TARGET(link_openssl_dlls_for_install_mysqlrouter ALL
COMMAND ${CMAKE_COMMAND} -E create_symlink
"../../lib/${CRYPTO_VERSION}" "${CRYPTO_VERSION}"
COMMAND ${CMAKE_COMMAND} -E create_symlink
"../../lib/${OPENSSL_VERSION}" "${OPENSSL_VERSION}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/plugin_output_directory/mysqlrouter"
BYPRODUCTS
"${CMAKE_BINARY_DIR}/plugin_output_directory/mysqlrouter/${CRYPTO_VERSION}"
"${CMAKE_BINARY_DIR}/plugin_output_directory/mysqlrouter/${OPENSSL_VERSION}"
)
ADD_DEPENDENCIES(mysqlrouter_all
link_openssl_dlls_for_install_mysqlrouter)
ADD_DEPENDENCIES(mysqlrouter_all
link_openssl_dlls)
INSTALL(FILES
${CMAKE_BINARY_DIR}/plugin_output_directory/mysqlrouter/${CRYPTO_VERSION}
${CMAKE_BINARY_DIR}/plugin_output_directory/mysqlrouter/${OPENSSL_VERSION}
DESTINATION ${ROUTER_INSTALL_PLUGINDIR} COMPONENT Router
)
ENDIF()