MDEV-13370 Ambiguous behaviour regarding installation of header files

install all server includes under /usr/include/mysql/server/
and C/C includes under /usr/include/mysql/
This commit is contained in:
Sergei Golubchik 2017-08-09 20:35:33 +02:00
parent c872b10022
commit 3ec96c1824
6 changed files with 15 additions and 10 deletions

View file

@ -1,6 +1,5 @@
usr/bin/mysql_config
usr/include/mysql/*.h
usr/include/mysql/psi/*.h
usr/include/mysql
usr/lib/*/libmariadb.so
usr/lib/*/libmariadbclient.a
usr/lib/*/libmysqlservices.a

View file

@ -64,18 +64,24 @@ 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}")
MACRO(INSTALL_PRIVATE DIR)
INSTALL(DIRECTORY ${DIR}/.
DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development
FILES_MATCHING PATTERN "*.h"
PATTERN CMakeFiles EXCLUDE
PATTERN mysql EXCLUDE

@ -1 +1 @@
Subproject commit eb058204233863f1b949209e5c4649489174d299
Subproject commit 11321f16bfcd92e210d5736af7b7d5073a89c2ef

View file

@ -158,7 +158,7 @@ ENDFOREACH()
MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS}
OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT ${COMPONENT_MYSQLSERVER})
INSTALL(FILES embedded_priv.h DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT ${COMPONENT_MYSQLSERVER})
INSTALL(FILES embedded_priv.h DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT ${COMPONENT_MYSQLSERVER})
# Visual Studio users need debug static library
IF(MSVC)

View file

@ -510,6 +510,6 @@ IF(PCRE_SHOW_REPORT)
MESSAGE(STATUS "")
ENDIF(PCRE_SHOW_REPORT)
INSTALL(FILES ${CMAKE_BINARY_DIR}/pcre/pcre.h DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development)
INSTALL(FILES ${CMAKE_BINARY_DIR}/pcre/pcre.h DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development)
# end CMakeLists.txt

View file

@ -472,7 +472,7 @@ IF(WIN32)
TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice)
ENDIF(WIN32)
INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development
INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development
FILES_MATCHING PATTERN "*.h"
PATTERN share EXCLUDE
PATTERN CMakeFiles EXCLUDE)