mirror of
https://github.com/typesense/typesense.git
synced 2025-05-28 09:46:05 +08:00
Merge branch 'master' into docker-build
This commit is contained in:
commit
5478e75586
@ -10,29 +10,28 @@ if(NOT EXISTS ${DEP_ROOT_DIR})
|
||||
file(MAKE_DIRECTORY ${DEP_ROOT_DIR})
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)
|
||||
add_definitions(-D__GLIBCXX__)
|
||||
set(ENV{OPENSSL_ROOT_DIR} /usr/local/opt/openssl) # For Brew
|
||||
endif (APPLE)
|
||||
|
||||
FIND_PACKAGE(OpenSSL REQUIRED)
|
||||
|
||||
include(cmake/For.cmake)
|
||||
include(cmake/H2O.cmake)
|
||||
include(cmake/RocksDB.cmake)
|
||||
include(cmake/GoogleTest.cmake)
|
||||
include(cmake/TestResources.cmake)
|
||||
|
||||
if (APPLE)
|
||||
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)
|
||||
add_definitions(-D__GLIBCXX__)
|
||||
|
||||
# For openssl installed with Brew
|
||||
include_directories(/usr/local/opt/openssl/include)
|
||||
link_directories(/usr/local/opt/openssl/lib)
|
||||
endif (APPLE)
|
||||
|
||||
FILE(GLOB HEADER_FILES include/*)
|
||||
FILE(GLOB SRC_FILES src/*.cpp)
|
||||
|
||||
include_directories(include)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
include_directories(${DEP_ROOT_DIR}/${FOR_NAME})
|
||||
include_directories(${DEP_ROOT_DIR}/${GTEST_NAME}/googletest/include)
|
||||
include_directories(${DEP_ROOT_DIR}/${H2O_NAME}/include)
|
||||
include_directories(${DEP_ROOT_DIR}/${H2O_NAME}/build/libressl-build/include)
|
||||
include_directories(${DEP_ROOT_DIR}/${ROCKSDB_NAME}/include)
|
||||
|
||||
link_directories(${DEP_ROOT_DIR}/${GTEST_NAME}/googletest/build)
|
||||
@ -51,7 +50,7 @@ target_compile_definitions(search PRIVATE ROOT_DIR="${CMAKE_SOURCE_DIR}/")
|
||||
target_compile_definitions(benchmark PRIVATE ROOT_DIR="${CMAKE_SOURCE_DIR}/")
|
||||
target_compile_definitions(typesense_test PRIVATE ROOT_DIR="${CMAKE_SOURCE_DIR}/")
|
||||
|
||||
target_link_libraries(typesense-server for h2o-evloop pthread rocksdb ssl crypto dl)
|
||||
target_link_libraries(typesense-server for h2o-evloop pthread rocksdb ${OPENSSL_LIBRARIES})
|
||||
target_link_libraries(search for pthread rocksdb)
|
||||
target_link_libraries(benchmark for pthread rocksdb)
|
||||
target_link_libraries(typesense_test pthread for rocksdb gtest gtest_main)
|
||||
|
@ -16,5 +16,9 @@ endif()
|
||||
|
||||
if(NOT EXISTS ${DEP_ROOT_DIR}/${FOR_NAME}/libfor.a)
|
||||
message("Building libfor locally...")
|
||||
execute_process(COMMAND make WORKING_DIRECTORY ${DEP_ROOT_DIR}/${FOR_NAME}/)
|
||||
execute_process(COMMAND make WORKING_DIRECTORY ${DEP_ROOT_DIR}/${FOR_NAME}/
|
||||
RESULT_VARIABLE FOR_BUILD)
|
||||
if(NOT FOR_BUILD EQUAL 0)
|
||||
message(FATAL_ERROR "${FOR_NAME} build failed!")
|
||||
endif()
|
||||
endif()
|
||||
|
@ -16,5 +16,9 @@ endif()
|
||||
|
||||
if(NOT EXISTS ${DEP_ROOT_DIR}/${ROCKSDB_NAME}/librocksdb.so)
|
||||
message("Building ${ROCKSDB_NAME} locally...")
|
||||
execute_process(COMMAND make "shared_lib" WORKING_DIRECTORY ${DEP_ROOT_DIR}/${ROCKSDB_NAME}/)
|
||||
execute_process(COMMAND make "shared_lib" WORKING_DIRECTORY ${DEP_ROOT_DIR}/${ROCKSDB_NAME}/
|
||||
RESULT_VARIABLE ROCKSDB_BUILD)
|
||||
if(NOT ROCKSDB_BUILD EQUAL 0)
|
||||
message(FATAL_ERROR "${ROCKSDB_NAME} build failed!")
|
||||
endif()
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user