Skip to content

Instantly share code, notes, and snippets.

@nirbhayc
Created November 6, 2015 17:33
Show Gist options
  • Save nirbhayc/b5248dd06cc32eccd878 to your computer and use it in GitHub Desktop.
Save nirbhayc/b5248dd06cc32eccd878 to your computer and use it in GitHub Desktop.
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 2ab4350..c369e1d 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -79,16 +79,23 @@ IF(UNIX)
IF(HAVE_SYSTEMD)
CONFIGURE_FILE(mariadb.service.in
${CMAKE_CURRENT_BINARY_DIR}/mariadb.service @ONLY)
- IF(NOT RPM)
+ INSTALL(FILES use_galera_new_cluster.conf
+ ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
+ DESTINATION ${inst_location}/systemd COMPONENT SupportFiles)
+
+ # @ in directory name broken between CMake version 2.8.12.2 and 3.3
+ # http://public.kitware.com/Bug/view.php?id=14782
+ IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)
CONFIGURE_FILE(mariadb@.service.in
${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service @ONLY)
- INSTALL(FILES use_galera_new_cluster.conf
- ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
- ${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb@.service
DESTINATION ${inst_location}/systemd COMPONENT SupportFiles)
ENDIF()
+
IF(INSTALL_SYSTEMD_UNITDIR)
- # @ in directory name broken between CMake version 2.8.12.2 and 3.3
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
+ DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server)
+
# http://public.kitware.com/Bug/view.php?id=14782
IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)
INSTALL(FILES use_galera_new_cluster.conf
@@ -99,8 +106,6 @@ IF(UNIX)
DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server)
ENDIF()
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
- DESTINATION ${INSTALL_SYSTEMD_UNITDIR} COMPONENT Server)
ENDIF()
ENDIF()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment