summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-08-09 18:23:04 +0200
committerSergei Golubchik <serg@mariadb.org>2017-08-14 19:45:58 +0200
commitc872b10022180602fbd5b2b0310b6d1e343dff5a (patch)
treebf899ad9e77c58b4efc4f2b73c3f1a4e0253fab5 /include/CMakeLists.txt
parentc9db190fed4e368201703e3d1031e16abfd61e45 (diff)
downloadmariadb-git-c872b10022180602fbd5b2b0310b6d1e343dff5a.tar.gz
don't install same files twice
CMakeLists.txt - merge mistake, apparently include/CMakeLists.txt - install from CMAKE_CURRENT_BINARY_DIR. Only install from CMAKE_CURRENT_SOURCE_DIR, if it's different from CMAKE_CURRENT_BINARY_DIR mysql-test/CMakeLists.txt - INSTALL_MYSQL_TEST() macro installs everything, no need to install mtr separately once again mysql-test/lib/My/SafeProcess/CMakeLists.txt MYSQL_ADD_EXECUTABLE includes INSTALL sql-bench/CMakeLists.txt list files explicitly. don't install garbage, don't process 'foo' and 'foo.sh' separately, it's only one file to install, not two.
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index e6de8515fdc..770a9492993 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -73,14 +73,17 @@ INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development
STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}")
STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
-INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
- FILES_MATCHING PATTERN "*.h"
- PATTERN CMakeFiles EXCLUDE
- PATTERN mysql EXCLUDE
- REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
+MACRO(INSTALL_PRIVATE DIR)
+ INSTALL(DIRECTORY ${DIR}/.
+ DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
+ FILES_MATCHING PATTERN "*.h"
+ PATTERN CMakeFiles EXCLUDE
+ PATTERN mysql EXCLUDE
+ REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
+ENDMACRO()
+
+INSTALL_PRIVATE(${CMAKE_CURRENT_BINARY_DIR})
+IF(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+ INSTALL_PRIVATE(${CMAKE_CURRENT_SOURCE_DIR})
+ENDIF()
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/. DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
- FILES_MATCHING PATTERN "*.h"
- PATTERN CMakeFiles EXCLUDE
- PATTERN mysql EXCLUDE
- REGEX "\\./(${EXCL_RE}$)" EXCLUDE)