Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x configurable paths #614

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,19 @@ add_subdirectory(galera)
add_subdirectory(scripts/packages)
add_subdirectory(wsrep/tests)

# Make the install destination for documentation files configurable
if(NOT DEFINED INSTALL_DOCDIR)
set(INSTALL_DOCDIR "doc" CACHE STRING "path to install documentation to")
endif()

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD")
install(FILES
${PROJECT_SOURCE_DIR}/AUTHORS
${PROJECT_SOURCE_DIR}/COPYING
${PROJECT_SOURCE_DIR}/README
DESTINATION doc)
DESTINATION ${INSTALL_DOCDIR} )
install(FILES ${PROJECT_SOURCE_DIR}/asio/LICENSE_1_0.txt
DESTINATION doc
DESTINATION ${INSTALL_DOCDIR}
RENAME LICENSE.asio)
endif()

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ Other contributors:
* Christian Hesse <mail@eworm.de>
* Andrzej Godziuk <gdr@gdr.name>
* Otto Kekäläinen <otto@kekalainen.net>
* Michal Schorm <mschorm@centrum.cz>
[add name and email/username above this line, but leave this line intact]
7 changes: 6 additions & 1 deletion galera/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ endif()

target_link_libraries(galera_smm galera ${GALERA_LINK_OPTIONS})

install(TARGETS galera_smm DESTINATION lib)
# Make the install destination for the shared library configurable
if(NOT DEFINED INSTALL_LIBDIR)
set(INSTALL_LIBDIR "lib" CACHE STRING "path to install shared libraries to")
endif()

install(TARGETS galera_smm DESTINATION ${INSTALL_LIBDIR})

# The following checks are guaranteed to work only
# Linux platform, we skip them on others.
Expand Down
45 changes: 41 additions & 4 deletions garb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,51 @@ target_compile_options(garbd
target_link_libraries(garbd gcs4garb gcomm gcache
${Boost_PROGRAM_OPTIONS_LIBRARIES})

install(TARGETS garbd DESTINATION bin)
# Make the install destination for garbd binary configurable
if(NOT DEFINED INSTALL_GARBD)
set(INSTALL_GARBD "bin" CACHE STRING "path to install garbd binary to")
endif()

install(TARGETS garbd
DESTINATION ${INSTALL_GARBD})

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD")

# Make the install destination for garbd-systemd wrapper script configurable
if(NOT DEFINED INSTALL_GARBD-SYSTEMD)
set(INSTALL_GARBD-SYSTEMD "share" CACHE STRING "path to install garbd-systemd wrapper script to")
endif()

install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/files/garb-systemd
DESTINATION ${INSTALL_GARBD-SYSTEMD})

# Make the install destination for garbd configuration file configurable
if(NOT DEFINED INSTALL_CONFIGURATION)
set(INSTALL_CONFIGURATION "share" CACHE STRING "path to install garbd configuration to")
endif()

install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/files/garb.cnf
DESTINATION ${INSTALL_CONFIGURATION}
RENAME garb)

# Make the install destination for garbd systemd service file configurable
if(NOT DEFINED INSTALL_SYSTEMD_SERVICE)
set(INSTALL_SYSTEMD_SERVICE "share" CACHE STRING "path to install garbd Systemd service to")
endif()

install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/files/garb.service
${CMAKE_CURRENT_SOURCE_DIR}/files/garb-systemd
DESTINATION share)
DESTINATION ${INSTALL_SYSTEMD_SERVICE})

# Make the install destination for manpage configurable
if(NOT DEFINED INSTALL_MANPAGE)
set(INSTALL_MANPAGE "man/man8" CACHE STRING "path to install manpage to")
endif()

install(FILES
${PROJECT_SOURCE_DIR}/man/garbd.8
DESTINATION man/man8)
DESTINATION ${INSTALL_MANPAGE})

endif()