Skip to content

Commit

Permalink
ODBC-257 and ODBC-258
Browse files Browse the repository at this point in the history
ODBC-257 copy/paste error in the cmake config
ODBC-258 introduced INSTALL_DOC_DIR and INSTALL_LICENSE_DIR cmake
parameters to make installation paths of docs and license file
configurable. Also changed default subdirectoly name for those files from mariadb_connector_odbc to mariadb-connector-odbc
  • Loading branch information
lawrinn committed Jun 26, 2019
1 parent 64bc771 commit 749d73d
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ IF(WIN32)
ENDIF()


SET(CPACK_PACKAGE_NAME "mariadb_connector_odbc")
SET(CPACK_PACKAGE_NAME "mariadb-connector-odbc")
IF(WIN32)
ADD_SUBDIRECTORY(wininstall)
ELSE()
Expand All @@ -344,11 +344,25 @@ ELSE()
LIBRARY DESTINATION ./${INSTALL_LIB_SUFFIX}
COMPONENT ODBCLibs)

IF(NOT DEFINED INSTALL_DOC_DIR)
SET(INSTALL_DOC_DIR "./share/doc/${CPACK_PACKAGE_NAME}/" CACHE STRING "Directory, where to install documentation(README)")
ENDIF()

IF(NOT DEFINED INSTALL_LICENSE_DIR)
SET(INSTALL_LICENSE_DIR "./share/doc/${CPACK_PACKAGE_NAME}/" CACHE STRING "Directory, where to install license file")
ENDIF()
MESSAGE(STATUS "Documetnation installed to ${INSTALL_DOC_DIR}")

This comment has been minimized.

Copy link
@FaramosCZ

FaramosCZ Jun 27, 2019

Typo:
"Documetnation" -> "Documentation"

This comment has been minimized.

Copy link
@lawrinn

lawrinn Jun 27, 2019

Author Collaborator

Thanks, will change in the next commit

MESSAGE(STATUS "License file installed to ${INSTALL_LICENSE_DIR}")

INSTALL(FILES
${CMAKE_SOURCE_DIR}/COPYING
${CMAKE_SOURCE_DIR}/README
DESTINATION
./share/doc/${CPACK_PACKAGE_NAME}/
${INSTALL_DOC_DIR}
COMPONENT Documentation)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/COPYING
DESTINATION
${INSTALL_LICENSE_DIR}
COMPONENT Documentation)
ENDIF()

Expand Down Expand Up @@ -393,9 +407,6 @@ IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
ENDIF()

# Packaging
SET(CPACK_PACKAGE_VERSION_MAJOR "${MARIADB_ODBC_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MARIADB_ODBC_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MARIADB_ODBC_VERSION_PATCH}")
SET(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab")
SET(CPACK_PACKAGE_DESCRIPTION "MariaDB Connector/ODBC. ODBC driver library for connecting to MariaDB and MySQL servers")
IF(NOT SYSTEM_NAME)
Expand Down

0 comments on commit 749d73d

Please sign in to comment.