From 9a5f37929abca7379c6790ad487b3e91b9a2fbaf Mon Sep 17 00:00:00 2001
From: Syping <syping@syping.de>
Date: Sun, 17 Mar 2024 05:22:22 +0100
Subject: [PATCH] DPPStaticBundle: get perl executable with find_program

---
 cmake/DPPStaticBundle.cmake | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmake/DPPStaticBundle.cmake b/cmake/DPPStaticBundle.cmake
index 23304eb..50331c6 100644
--- a/cmake/DPPStaticBundle.cmake
+++ b/cmake/DPPStaticBundle.cmake
@@ -19,7 +19,6 @@
 include(ArgumentPassthrough)
 
 # OpenSSL needs to be configured with perl and build with make
-find_package(Perl REQUIRED)
 find_program(MAKE_EXECUTABLE NAMES make gmake)
 if (NOT DEFINED MAKE_EXECUTABLE)
     message(SEND_ERROR "make not found")
@@ -35,6 +34,11 @@ if (DEFINED NPROC_EXECUTABLE)
     set(MAKE_JOBS_ARG "-j${NPROC}")
 endif()
 
+find_program(PERL_EXECUTABLE NAMES perl)
+if (NOT DEFINED PERL_EXECUTABLE)
+    message(SEND_ERROR "perl not found")
+endif()
+
 include(ExternalProject)
 ExternalProject_Add(ZLIB
     URL https://www.zlib.net/zlib-1.3.1.tar.xz