raven-rhel6/hyperscan/9b43401ed9096926985c5ae75199d9cd0231775d.patch
2024-02-21 20:14:44 +06:00

48 lines
1.6 KiB
Diff

From 9b43401ed9096926985c5ae75199d9cd0231775d Mon Sep 17 00:00:00 2001
From: ZMZ91 <zmoey@aliyun.com>
Date: Fri, 28 Feb 2020 21:18:13 +0800
Subject: [PATCH] support making chimera without pcre source code
---
CMakeLists.txt | 4 ++--
chimera/CMakeLists.txt | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83197af1e..11b36405b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -464,7 +464,7 @@ if (NOT CORRECT_PCRE_VERSION)
endif()
# we need static libs for Chimera - too much deep magic for shared libs
-if (CORRECT_PCRE_VERSION AND PCRE_BUILD_SOURCE AND BUILD_STATIC_LIBS)
+if (CORRECT_PCRE_VERSION AND BUILD_STATIC_LIBS AND (PCRE_FOUND OR PCRE_BUILD_SOURCE))
set(BUILD_CHIMERA TRUE)
endif()
@@ -516,7 +516,7 @@ if (NOT CORRECT_PCRE_VERSION)
endif()
# we need static libs for Chimera - too much deep magic for shared libs
-if (CORRECT_PCRE_VERSION AND PCRE_BUILD_SOURCE AND BUILD_STATIC_LIBS)
+if (CORRECT_PCRE_VERSION AND BUILD_STATIC_LIBS AND (PCRE_FOUND OR PCRE_BUILD_SOURCE))
set(BUILD_CHIMERA TRUE)
endif()
diff --git a/chimera/CMakeLists.txt b/chimera/CMakeLists.txt
index 1cd66a3f5..bffb3e44f 100644
--- a/chimera/CMakeLists.txt
+++ b/chimera/CMakeLists.txt
@@ -28,8 +28,8 @@ SET(chimera_SRCS
)
add_library(chimera STATIC ${chimera_SRCS})
-add_dependencies(chimera hs pcre)
-target_link_libraries(chimera hs pcre)
+message(STATUS "PCRE_LINK_LIBRARIES CHECK: ${PCRE_LINK_LIBRARIES}")
+target_link_libraries(chimera hs ${PCRE_LINK_LIBRARIES})
install(TARGETS chimera DESTINATION ${CMAKE_INSTALL_LIBDIR})