diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index b06d6ac9ca3..afc359d1d09 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -207,7 +207,17 @@ MACRO(MYSQL_ADD_PLUGIN) SET_TARGET_PROPERTIES(${target} PROPERTIES OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}") # Install dynamic library - IF(NOT ARG_COMPONENT) + IF(ARG_COMPONENT) + IF(RPM AND NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT}) + SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE) + SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server" PARENT_SCOPE) + + # workarounds for cmake issues #13248 and #12864: + SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE) + SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_PROVIDES "cmake_bug_13248" PARENT_SCOPE) + SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_OBSOLETES "cmake_bug_13248" PARENT_SCOPE) + ENDIF() + ELSE() SET(ARG_COMPONENT Server) ENDIF() MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT ${ARG_COMPONENT}) diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index 6d8796ff967..f6776d02602 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -44,5 +44,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ft-index/toku_include) SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb") SET(TOKUDB_SOURCES ha_tokudb.cc) MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY + COMPONENT "tokudb-engine" LINK_LIBRARIES tokufractaltree_static tokuportability_static z stdc++) SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin") diff --git a/storage/tokudb/ft-index/CMakeLists.txt b/storage/tokudb/ft-index/CMakeLists.txt index c2b79bcb8ac..33efb79285a 100644 --- a/storage/tokudb/ft-index/CMakeLists.txt +++ b/storage/tokudb/ft-index/CMakeLists.txt @@ -59,7 +59,8 @@ add_subdirectory(toku_include) install( FILES README.md README-TOKUDB - DESTINATION . + COMPONENT "tokudb-engine" + DESTINATION "${INSTALL_DOCREADMEDIR}/tokudb" ) ## build tags diff --git a/storage/tokudb/ft-index/ft/CMakeLists.txt b/storage/tokudb/ft-index/ft/CMakeLists.txt index c59e5eabd4b..d480a1464f3 100644 --- a/storage/tokudb/ft-index/ft/CMakeLists.txt +++ b/storage/tokudb/ft-index/ft/CMakeLists.txt @@ -103,7 +103,8 @@ target_link_libraries(ftverify m) install( TARGETS tokuftdump - DESTINATION bin + COMPONENT "tokudb-engine" + DESTINATION ${INSTALL_BINDIR} ) add_subdirectory(tests) diff --git a/storage/tokudb/ft-index/include/CMakeLists.txt b/storage/tokudb/ft-index/include/CMakeLists.txt index ba9cd7c5604..641a6820d96 100644 --- a/storage/tokudb/ft-index/include/CMakeLists.txt +++ b/storage/tokudb/ft-index/include/CMakeLists.txt @@ -1,4 +1,4 @@ install( FILES tdb-internal.h - DESTINATION include + DESTINATION ${INSTALL_INCLUDEDIR} )