Commit 3ec96c18 authored by Sergei Golubchik's avatar Sergei Golubchik

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/
parent c872b100
usr/bin/mysql_config usr/bin/mysql_config
usr/include/mysql/*.h usr/include/mysql
usr/include/mysql/psi/*.h
usr/lib/*/libmariadb.so usr/lib/*/libmariadb.so
usr/lib/*/libmariadbclient.a usr/lib/*/libmariadbclient.a
usr/lib/*/libmysqlservices.a usr/lib/*/libmysqlservices.a
......
...@@ -64,18 +64,24 @@ SET(HEADERS ...@@ -64,18 +64,24 @@ SET(HEADERS
json_lib.h 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}) 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) 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 "${HEADERS};${HEADERS_GEN_CONFIGURE}")
STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}") STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
MACRO(INSTALL_PRIVATE DIR) MACRO(INSTALL_PRIVATE DIR)
INSTALL(DIRECTORY ${DIR}/. INSTALL(DIRECTORY ${DIR}/.
DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development
FILES_MATCHING PATTERN "*.h" FILES_MATCHING PATTERN "*.h"
PATTERN CMakeFiles EXCLUDE PATTERN CMakeFiles EXCLUDE
PATTERN mysql EXCLUDE PATTERN mysql EXCLUDE
......
Subproject commit eb058204233863f1b949209e5c4649489174d299 Subproject commit 11321f16bfcd92e210d5736af7b7d5073a89c2ef
...@@ -158,7 +158,7 @@ ENDFOREACH() ...@@ -158,7 +158,7 @@ ENDFOREACH()
MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS} MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS}
OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT ${COMPONENT_MYSQLSERVER}) 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 # Visual Studio users need debug static library
IF(MSVC) IF(MSVC)
......
...@@ -510,6 +510,6 @@ IF(PCRE_SHOW_REPORT) ...@@ -510,6 +510,6 @@ IF(PCRE_SHOW_REPORT)
MESSAGE(STATUS "") MESSAGE(STATUS "")
ENDIF(PCRE_SHOW_REPORT) 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 # end CMakeLists.txt
...@@ -472,7 +472,7 @@ IF(WIN32) ...@@ -472,7 +472,7 @@ IF(WIN32)
TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice) TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice)
ENDIF(WIN32) ENDIF(WIN32)
INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development
FILES_MATCHING PATTERN "*.h" FILES_MATCHING PATTERN "*.h"
PATTERN share EXCLUDE PATTERN share EXCLUDE
PATTERN CMakeFiles EXCLUDE) PATTERN CMakeFiles EXCLUDE)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment