This patch is giving the maintainer option to define path to COPYING and README files.
Github PR: https://github.com/mariadb-corporation/mariadb-connector-odbc/pull/36
--- mariadb-connector-odbc-3.1.9-ga-src/CMakeLists.txt.old 2020-07-07 13:46:42.106327846 +0200
+++ mariadb-connector-odbc-3.1.9-ga-src/CMakeLists.txt 2020-07-07 13:47:34.037882817 +0200
@@ -378,7 +378,7 @@
#IF(NOT DEFINED INSTALL_LICENSE_DIR)
# SET(INSTALL_LICENSE_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${CPACK_PACKAGE_NAME}/" CACHE STRING "Directory, where to install license file")
#ENDIF()
- MESSAGE(STATUS "Documentation and License file are installed to ${INSTALL_DOCDIR}")
+ MESSAGE(STATUS "Documentation and License file are installed to ${INSTALL_DOCDIR} and ${INSTALL_LICENSEDIR}")
# MESSAGE(STATUS "License file installed to ${INSTALL_LICENSE_DIR}")
INSTALL(FILES
@@ -389,7 +389,7 @@
INSTALL(FILES
${CMAKE_SOURCE_DIR}/COPYING
DESTINATION
- "${INSTALL_DOCDIR}"
+ "${INSTALL_LICENSEDIR}"
COMPONENT Documentation)
ENDIF()
--- mariadb-connector-odbc-3.1.9-ga-src/cmake/install.cmake.old 2020-07-07 13:46:49.653408500 +0200
+++ mariadb-connector-odbc-3.1.9-ga-src/cmake/install.cmake 2020-07-07 13:50:40.297873326 +0200
@@ -21,6 +21,8 @@
# INSTALL_BINDIR location of binaries (mariadb_config)
# INSTALL_LIBDIR location of libraries
# INSTALL_PLUGINDIR location of plugins
+# INSTALL_DOCDIR location of docs
+# INSTALL_LICENSEDIR location of license
IF(NOT INSTALL_LAYOUT)
SET(INSTALL_LAYOUT "DEFAULT")
@@ -65,6 +67,7 @@
SET(INSTALL_PCDIR_DEFAULT "lib/pkgconfig")
SET(INSTALL_INCLUDEDIR_DEFAULT "include/mariadb")
SET(INSTALL_DOCDIR_DEFAULT "docs")
+SET(INSTALL_LICENSEDIR_DEFAULT ${INSTALL_DOCDIR})
IF(NOT IS_SUBPROJECT)
SET(INSTALL_PLUGINDIR_DEFAULT "lib/mariadb/plugin")
ELSE()
@@ -117,6 +120,14 @@
SET(INSTALL_PLUGINDIR_${INSTALL_LAYOUT} ${INSTALL_PLUGINDIR})
ENDIF()
+IF(INSTALL_DOCDIR)
+ SET(INSTALL_DOCDIR_${INSTALL_LAYOUT} ${INSTALL_DOCDIR})
+ENDIF()
+
+IF(INSTALL_LICENSEDIR)
+ SET(INSTALL_LICENSEDIR_${INSTALL_LAYOUT} ${INSTALL_LICENSEDIR})
+ENDIF()
+
# Extra INSTALL_PLUGINDIR_CLIENT that overrides any INSTALL_PLUGINDIR override
IF(INSTALL_PLUGINDIR_CLIENT)
SET(INSTALL_PLUGINDIR_${INSTALL_LAYOUT} ${INSTALL_PLUGINDIR_CLIENT})
@@ -140,7 +151,7 @@
SET(INSTALL_SUFFIXDIR_${INSTALL_LAYOUT} ${INSTALL_SUFFIXDIR})
ENDIF()
-FOREACH(dir "BIN" "LIB" "PC" "INCLUDE" "DOC" "PLUGIN")
+FOREACH(dir "BIN" "LIB" "PC" "INCLUDE" "DOC" "LICENSE" "PLUGIN")
SET(INSTALL_${dir}DIR ${INSTALL_${dir}DIR_${INSTALL_LAYOUT}})
MARK_AS_ADVANCED(INSTALL_${dir}DIR)
#MESSAGE1(INSTALL_${dir}DIR "MariaDB Connector ODBC: INSTALL_${dir}DIR=${INSTALL_${dir}DIR}")