Skip to content

Commit

Permalink
CMake - fix check for Snappy
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Gryniewicz <[email protected]>
  • Loading branch information
dang committed Sep 23, 2015
1 parent 3570dd5 commit 4d02f87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ CHECK_INCLUDE_FILES("fcgio.h" HAVE_FASTCGIO_H)
CHECK_INCLUDE_FILES("fcgios.h" FASTCGI_FASTCGIOS_DIR)
CHECK_INCLUDE_FILES("fcgi_stdio.h" HAVE_FASTCGI_STDIO_H)
CHECK_INCLUDE_FILES("openssl/ssl.h" HAVE_SSL_H)
CHECK_INCLUDE_FILES("snappy.h" HAVE_SNAPPY_H)
CHECK_INCLUDE_FILES("keyutils.h" HAVE_KEYUTILS_H)

include(CheckSymbolExists)
Expand Down Expand Up @@ -163,11 +162,7 @@ if(${WITH_GPERFTOOLS})
endif(${HAVE_GPERFTOOLS})
endif(${WITH_GPERFTOOLS})

option(WITH_SNAPPY "Snappy is here" ON)
if(${WITH_SNAPPY})
find_package(snappy REQUIRED)
set(HAVE_LIBSNAPPY ${SNAPPY_FOUND})
endif(${WITH_SNAPPY})

option(WITH_TCMALLOC "Use TCMalloc as Allocator" ON)
if(${WITH_TCMALLOC})
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/Findsnappy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ else ()
endif ()
endif ()

# handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(snappy DEFAULT_MSG SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR)

mark_as_advanced(
SNAPPY_LIBRARY
SNAPPY_I
Expand Down

0 comments on commit 4d02f87

Please sign in to comment.