diff options
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r-- | include/CMakeLists.txt | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index e6de8515fdc..e47522a4931 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -64,23 +64,32 @@ SET(HEADERS json_lib.h ) -INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) +# don't use C/C's (possibly outdated) copy of mysqld_error.h +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h + DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) + +INSTALL(FILES ${HEADERS} + DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development) FOREACH(f ${HEADERS_GEN_CONFIGURE}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} + DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development) ENDFOREACH(f) -INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h") 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}/server/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) |