memaslap: mv src/bin/contrib => contrib/bin
[awesomized/libmemcached] / CMake / _Include.cmake
index 8a33f964ebe9791fdea56cd997c08460cd94a3d8..9dbd3dfaaa221dafd27f12cdb1d61819500352d9 100644 (file)
@@ -6,7 +6,7 @@ endif()
 include(GNUInstallDirs)
 include(CMakePackageConfigHelpers)
 
-if(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
+if(CMAKE_HOST_SYSTEM_NAME MATCHES "BSD")
     find_program(PKGCONF pkgconf)
     if(PKGCONF)
         set(PKG_CONFIG_EXECUTABLE ${PKGCONF})
@@ -25,7 +25,6 @@ include(CheckDependency)
 include(CheckHeader)
 include(CheckCompiles)
 include(CheckType)
-include(CheckStdatomic)
 include(TestBigEndian)
 include(CheckByteswap)
 
@@ -34,16 +33,6 @@ include(CheckByteswap)
 ## debug
 check_debug()
 
-## memaslap
-if(ENABLE_MEMASLAP)
-    check_stdatomic()
-    check_dependency(LIBEVENT event event.h)
-    check_decl(getline stdio.h)
-    if(LIBEVENT AND HAVE_C_STDATOMIC)
-        set(HAVE_MEMASLAP 1)
-    endif()
-endif()
-
 ## dtrace
 include(EnableDtrace)
 if(ENABLE_DTRACE)
@@ -61,13 +50,12 @@ if(BUILD_TESTING)
         find_package(Memcached)
         set(MEMCACHED_BINARY ${MEMCACHED_EXECUTABLE})
     endif()
-    check_dependency(LIBUUID uuid uuid/uuid.h)
 endif()
 
 ## sasl
 if(ENABLE_SASL)
     check_dependency(LIBSASL sasl2 sasl/sasl.h)
-    if(LIBSASL)
+    if(HAVE_LIBSASL)
         set(LIBMEMCACHED_WITH_SASL_SUPPORT 1)
     endif()
 endif()
@@ -129,9 +117,15 @@ check_decl(abi::__cxa_demangle cxxabi.h)
 find_package(Backtrace)
 if(Backtrace_FOUND)
     set(HAVE_BACKTRACE 1)
+    set(BACKTRACE BACKTRACE)
+    add_library(BACKTRACE INTERFACE IMPORTED)
+    set_target_properties(BACKTRACE PROPERTIES
+            INTERFACE_LINK_LIBRARIES "${Backtrace_LIBRARIES}"
+            INTERFACE_INCLUDE_DIRECTORIES "${Backtrace_INCLUDE_DIR}")
 endif()
 
 check_type(in_port_t netinet/in.h)
 
 check_header(cstdint)
 check_header(cinttypes)
+check_header(inttypes.h)