summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-11-29 05:21:03 +1100
committerGitHub <noreply@github.com>2022-11-28 18:21:03 +0000
commit7b44d0ba573c3a07d5fe8b43251c705ec1d63597 (patch)
treeaf2014421266e78acd2757e1428313ad3d008303 /include/CMakeLists.txt
parentbd694bb7b28f64eb36704dd795ae351117ebeea4 (diff)
downloadmariadb-git-7b44d0ba573c3a07d5fe8b43251c705ec1d63597.tar.gz
MDEV-23230 wsrep files installed when built without WSREP (#2334)
Prevent wsrep files from being installed if WITH_WSREP=OFF. Reviewed by Daniel Black Additionally excluded #include wsrep files and galera* files along with galera/wsrep tests. mysql-test/include/have_wsrep.inc remainds as its used by a few isolated tests. Co-authored-by: Chris Ross <cross2@cisco.com>
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index a7b98a11050..7076d2d88d2 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -74,7 +74,15 @@ FOREACH(f ${HEADERS_GEN_CONFIGURE})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}
DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development)
ENDFOREACH(f)
-INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h")
+IF(NOT WITH_WSREP)
+ SET(EXCL_SERVICE_WSREP "service_wsrep.h")
+ SET(EXCL_WSREP "wsrep.h")
+ENDIF()
+INSTALL(DIRECTORY mysql/
+ DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN "${EXCL_SERVICE_WSREP}" EXCLUDE
+)
STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}")
STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
@@ -85,6 +93,7 @@ MACRO(INSTALL_PRIVATE DIR)
FILES_MATCHING PATTERN "*.h"
PATTERN CMakeFiles EXCLUDE
PATTERN mysql EXCLUDE
+ PATTERN "${EXCL_WSREP}" EXCLUDE
REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
ENDMACRO()