2016-12-01 22:44:59 +00:00
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast")
|
2016-08-25 21:55:02 +00:00
|
|
|
|
2016-12-20 13:48:32 +00:00
|
|
|
if (USE_INTERNAL_BOOST_LIBRARY)
|
2017-09-04 17:04:33 +00:00
|
|
|
add_subdirectory (libboost)
|
2016-12-20 13:48:32 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-02-28 23:49:04 +00:00
|
|
|
if (USE_INTERNAL_LZ4_LIBRARY)
|
2017-10-13 18:52:23 +00:00
|
|
|
add_subdirectory (lz4-cmake)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_ZSTD_LIBRARY)
|
2017-10-13 18:52:23 +00:00
|
|
|
add_subdirectory (zstd-cmake)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_RE2_LIBRARY)
|
2017-09-04 17:04:33 +00:00
|
|
|
add_subdirectory (libre2)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY)
|
2018-01-16 17:25:25 +00:00
|
|
|
add_subdirectory (double-conversion)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_ZOOKEEPER_LIBRARY)
|
2017-10-13 19:02:41 +00:00
|
|
|
add_subdirectory (zookeeper/src/c)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-08-09 20:52:55 +00:00
|
|
|
if (USE_INTERNAL_CITYHASH_LIBRARY)
|
|
|
|
add_subdirectory (libcityhash)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_FARMHASH_LIBRARY)
|
|
|
|
add_subdirectory (libfarmhash)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_METROHASH_LIBRARY)
|
|
|
|
add_subdirectory (libmetrohash)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (USE_INTERNAL_BTRIE_LIBRARY)
|
|
|
|
add_subdirectory (libbtrie)
|
|
|
|
endif ()
|
2017-06-23 14:41:07 +00:00
|
|
|
|
|
|
|
if (USE_INTERNAL_UNWIND_LIBRARY)
|
2017-09-04 17:04:33 +00:00
|
|
|
add_subdirectory (libunwind)
|
2017-06-23 14:41:07 +00:00
|
|
|
endif ()
|
2017-02-28 23:49:04 +00:00
|
|
|
|
2017-02-07 21:28:13 +00:00
|
|
|
if (USE_INTERNAL_ZLIB_LIBRARY)
|
2017-11-21 17:46:28 +00:00
|
|
|
add_subdirectory (zlib-ng)
|
|
|
|
# todo: make pull to Dead2/zlib-ng and remove:
|
|
|
|
# We should use same defines when including zlib.h as used when zlib compiled
|
|
|
|
target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
|
|
|
target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
2017-11-30 17:09:33 +00:00
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
|
|
|
|
target_compile_definitions (zlib PUBLIC X86_64)
|
|
|
|
target_compile_definitions (zlibstatic PUBLIC X86_64)
|
|
|
|
endif ()
|
|
|
|
|
2017-11-22 12:15:17 +00:00
|
|
|
set_target_properties(example PROPERTIES EXCLUDE_FROM_ALL 1)
|
2017-11-24 19:24:07 +00:00
|
|
|
if (TARGET example64)
|
|
|
|
set_target_properties(example64 PROPERTIES EXCLUDE_FROM_ALL 1)
|
|
|
|
endif ()
|
2018-01-18 20:33:16 +00:00
|
|
|
|
|
|
|
set_target_properties(minigzip PROPERTIES EXCLUDE_FROM_ALL 1)
|
2017-11-24 19:24:07 +00:00
|
|
|
if (TARGET minigzip64)
|
|
|
|
set_target_properties(minigzip64 PROPERTIES EXCLUDE_FROM_ALL 1)
|
|
|
|
endif ()
|
2017-02-07 21:28:13 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-06-23 14:41:07 +00:00
|
|
|
if (USE_INTERNAL_CCTZ_LIBRARY)
|
2017-11-02 18:55:52 +00:00
|
|
|
add_subdirectory (cctz-cmake)
|
2017-06-23 14:41:07 +00:00
|
|
|
endif ()
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2017-11-28 19:57:15 +00:00
|
|
|
if (ENABLE_TCMALLOC AND USE_INTERNAL_GPERFTOOLS_LIBRARY)
|
2017-10-24 19:18:15 +00:00
|
|
|
add_subdirectory (libtcmalloc)
|
2016-12-01 22:44:59 +00:00
|
|
|
endif ()
|
2016-11-28 15:35:13 +00:00
|
|
|
|
2017-08-09 20:52:55 +00:00
|
|
|
if (NOT ARCH_ARM)
|
2017-09-04 17:04:33 +00:00
|
|
|
add_subdirectory (libcpuid)
|
2017-08-31 17:11:30 +00:00
|
|
|
endif ()
|
2017-10-06 04:40:18 +00:00
|
|
|
|
|
|
|
if (USE_INTERNAL_RDKAFKA_LIBRARY)
|
2018-01-11 18:39:52 +00:00
|
|
|
set(RDKAFKA_BUILD_EXAMPLES OFF CACHE INTERNAL "")
|
|
|
|
set(RDKAFKA_BUILD_TESTS OFF CACHE INTERNAL "")
|
|
|
|
set(RDKAFKA_BUILD_STATIC ON CACHE INTERNAL "")
|
2017-10-06 04:40:18 +00:00
|
|
|
mark_as_advanced(ZLIB_INCLUDE_DIR)
|
|
|
|
add_subdirectory (librdkafka)
|
2017-10-13 19:24:37 +00:00
|
|
|
endif ()
|
2017-10-13 20:52:42 +00:00
|
|
|
|
2018-01-11 18:39:52 +00:00
|
|
|
if (USE_INTERNAL_CAPNP_LIBRARY)
|
|
|
|
set(BUILD_TESTING 0 CACHE INTERNAL "")
|
|
|
|
set (_save ${CMAKE_CXX_EXTENSIONS})
|
|
|
|
set (CMAKE_CXX_EXTENSIONS)
|
|
|
|
add_subdirectory (capnproto/c++)
|
|
|
|
set (CMAKE_CXX_EXTENSIONS ${_save})
|
|
|
|
target_include_directories(${CAPNP_LIBRARY} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/capnproto/c++/src>)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
2017-10-13 18:58:19 +00:00
|
|
|
if (USE_INTERNAL_POCO_LIBRARY)
|
2018-01-13 01:16:23 +00:00
|
|
|
set (save_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
|
|
|
set (save_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
2017-10-13 18:58:19 +00:00
|
|
|
set (_save ${ENABLE_TESTS})
|
|
|
|
set (ENABLE_TESTS 0)
|
|
|
|
set (CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
|
|
|
|
add_subdirectory (poco)
|
|
|
|
unset (CMAKE_DISABLE_FIND_PACKAGE_ZLIB)
|
|
|
|
set (ENABLE_TESTS ${_save})
|
2018-01-13 01:16:23 +00:00
|
|
|
set (CMAKE_CXX_FLAGS ${save_CMAKE_CXX_FLAGS})
|
|
|
|
set (CMAKE_C_FLAGS ${save_CMAKE_C_FLAGS})
|
2018-01-19 17:04:32 +00:00
|
|
|
if (OPENSSL_FOUND)
|
|
|
|
# Bug in poco https://github.com/pocoproject/poco/pull/2100 found on macos
|
|
|
|
target_include_directories(Crypto PUBLIC ${OPENSSL_INCLUDE_DIR})
|
|
|
|
endif ()
|
2017-10-13 18:58:19 +00:00
|
|
|
endif ()
|