ebd438
We have some downstream patches and other scripts that include variables to
ebd438
be expanded by cmake. Cmake needs to know about them, so adding them manually.
ebd438
ebd438
 # Install libgcc as  mylibgcc.a
ebd438
--- mariadb-10.5.5/scripts/CMakeLists.txt.old	2020-09-24 10:13:35.272589689 +0200
ebd438
+++ mariadb-10.5.5/scripts/CMakeLists.txt	2020-09-24 10:17:31.428985798 +0200
ebd438
@@ -377,6 +377,34 @@
ebd438
       INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT})
ebd438
     ENDIF()
ebd438
   ENDFOREACH()
ebd438
+
ebd438
+  # files for systemd
ebd438
+  SET(SYSTEMD_SCRIPTS
ebd438
+    mariadb.tmpfiles.d
ebd438
+    mysql.service
ebd438
+    mysql@.service
ebd438
+    mariadb-prepare-db-dir
ebd438
+    mariadb-check-socket
ebd438
+    mariadb-check-upgrade
ebd438
+    mariadb-scripts-common
ebd438
+    mysql_config_multilib
ebd438
+    clustercheck
ebd438
+    galera_new_cluster
ebd438
+    my.cnf
ebd438
+  )
ebd438
+  FOREACH(file ${SYSTEMD_SCRIPTS})
ebd438
+    IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
ebd438
+      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
ebd438
+        ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
ebd438
+    ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in)
ebd438
+      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.in
ebd438
+        ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
ebd438
+    ELSE()
ebd438
+      MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file}.in in "
ebd438
+        "${CMAKE_CURRENT_SOURCE_DIR}" )
ebd438
+    ENDIF()
ebd438
+  ENDFOREACH()
ebd438
+
ebd438
 ENDIF()
ebd438
 
ebd438
 # Install libgcc as  mylibgcc.a