summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindZSTD.cmake18
-rw-r--r--cmake/Findzstd.cmake25
-rw-r--r--cmake/package_name.cmake2
-rw-r--r--cmake/systemd.cmake10
4 files changed, 32 insertions, 23 deletions
diff --git a/cmake/FindZSTD.cmake b/cmake/FindZSTD.cmake
deleted file mode 100644
index 0fd73501327..00000000000
--- a/cmake/FindZSTD.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-find_path(
- ZSTD_INCLUDE_DIR
- NAMES "zstd.h"
-)
-
-find_library(
- ZSTD_LIBRARY
- NAMES zstd
-)
-
-set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
- ZSTD DEFAULT_MSG ZSTD_INCLUDE_DIR ZSTD_LIBRARIES)
-
-mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARIES ZSTD_FOUND)
-
diff --git a/cmake/Findzstd.cmake b/cmake/Findzstd.cmake
new file mode 100644
index 00000000000..8cd4c248145
--- /dev/null
+++ b/cmake/Findzstd.cmake
@@ -0,0 +1,25 @@
+# - Find zstd
+# Find the zstd compression library and includes
+#
+# ZSTD_INCLUDE_DIR - where to find zstd.h, etc.
+# ZSTD_LIBRARIES - List of libraries when using zstd.
+# ZSTD_FOUND - True if zstd found.
+
+if (DEFINED ZSTD_LIBRARIES)
+ return()
+endif()
+
+find_path(ZSTD_INCLUDE_DIR
+ NAMES zstd.h
+ HINTS ${ZSTD_ROOT_DIR}/include)
+
+find_library(ZSTD_LIBRARIES
+ NAMES zstd
+ HINTS ${ZSTD_ROOT_DIR}/lib)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIR)
+
+mark_as_advanced(
+ ZSTD_LIBRARIES
+ ZSTD_INCLUDE_DIR)
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index a8bd1596f47..73a53b0766a 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -135,7 +135,7 @@ IF(NOT VERSION)
SET(package_name "mariadb${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
- MESSAGE(STATUS "Packaging as: ${package_name}")
+ MESSAGE_ONCE(package_name "Packaging as: ${package_name}")
# Sometimes package suffix is added (something like "-icc-glibc23")
IF(PACKAGE_SUFFIX)
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index f7365066ef6..fc36d7cefbf 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -20,10 +20,12 @@ MACRO(CHECK_SYSTEMD)
SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support")
IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto")
IF(PKG_CONFIG_FOUND)
- IF(WITH_SYSTEMD STREQUAL "yes")
- pkg_search_module(LIBSYSTEMD REQUIRED libsystemd libsystemd-daemon)
- ELSE()
- pkg_search_module(LIBSYSTEMD libsystemd libsystemd-daemon)
+ IF (NOT DEFINED LIBSYSTEMD_FOUND)
+ IF(WITH_SYSTEMD STREQUAL "yes")
+ pkg_search_module(LIBSYSTEMD REQUIRED libsystemd libsystemd-daemon)
+ ELSE()
+ pkg_search_module(LIBSYSTEMD libsystemd libsystemd-daemon)
+ ENDIF()
ENDIF()
IF(HAVE_DLOPEN)
SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})