[Groonga-commit] groonga/groonga at 1d23ac2 [master] cmake: use pkg-config to detect LZ4

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Dec 15 14:46:40 JST 2014


Kouhei Sutou	2014-12-15 14:46:40 +0900 (Mon, 15 Dec 2014)

  New Revision: 1d23ac23ed8050a9d6884ef158811772ce40e767
  https://github.com/groonga/groonga/commit/1d23ac23ed8050a9d6884ef158811772ce40e767

  Message:
    cmake: use pkg-config to detect LZ4
    
    It maybe works...

  Modified files:
    CMakeLists.txt

  Modified: CMakeLists.txt (+6 -4)
===================================================================
--- CMakeLists.txt    2014-12-15 14:43:01 +0900 (c904fe0)
+++ CMakeLists.txt    2014-12-15 14:46:40 +0900 (567c579)
@@ -310,12 +310,14 @@ endif()
 set(GRN_WITH_LZ4 "auto"
   CACHE STRING "Support data compression by LZ4.")
 if(NOT ${GRN_WITH_LZ4} STREQUAL "no")
-  ac_check_lib(lz4 LZ4_compress)
-  if(NOT HAVE_LIBLZ4)
+  pkg_check_modules(LIBLZ4 liblz4)
+  if(LIBLZ4_FOUND)
+    set(GRN_WITH_LZ4 TRUE)
+  else()
     if(${GRN_WITH_LZ4} STREQUAL "yes")
-      message(FATAL_ERROR "No liblz4 found")
+      message(FATAL_ERROR "No LZ4 found")
     endif()
-    set(GRN_WITH_LZ4 "no")
+    set(GRN_WITH_LZ4 FALSE)
   endif()
 endif()
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index