665d94
We have some downstream patches and other scripts that include variables to
665d94
be expanded by cmake. Cmake needs to know about them, so adding them manually.
665d94
665d94
--- mariadb-10.3.8/scripts/CMakeLists.txt	2018-07-02 09:34:11.000000000 +0200
665d94
+++ mariadb-10.3.8/scripts/CMakeLists.txt_patched	2018-07-03 10:58:15.954670153 +0200
665d94
@@ -361,6 +361,34 @@ ELSE()
665d94
       COMPONENT ${${file}_COMPONENT}
665d94
      )
665d94
   ENDFOREACH()
665d94
+
665d94
+  # files for systemd
665d94
+  SET(SYSTEMD_SCRIPTS
665d94
+    mysql.tmpfiles.d
665d94
+    mysql.service
665d94
+    mysql@.service
665d94
+    mysql-prepare-db-dir
665d94
+    mysql-check-socket
665d94
+    mysql-check-upgrade
665d94
+    mysql-scripts-common
665d94
+    mysql_config_multilib
665d94
+    clustercheck
665d94
+    galera_new_cluster
665d94
+    my.cnf
665d94
+  )
665d94
+  FOREACH(file ${SYSTEMD_SCRIPTS})
665d94
+    IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
665d94
+      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
665d94
+        ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
665d94
+    ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in)
665d94
+      CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.in
665d94
+        ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY)
665d94
+    ELSE()
665d94
+      MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file}.in in "
665d94
+        "${CMAKE_CURRENT_SOURCE_DIR}" )
665d94
+    ENDIF()
665d94
+  ENDFOREACH()
665d94
+
665d94
 ENDIF()
665d94
 
665d94
 # Install libgcc as  mylibgcc.a