mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Freebsd: preparing port, misc build/install chandes
This commit is contained in:
parent
4bfa697656
commit
ecb7642c4f
@ -139,6 +139,9 @@ endif (ENABLE_TESTS)
|
||||
# Installation prefix
|
||||
if (NOT CMAKE_SYSTEM MATCHES "FreeBSD")
|
||||
set (CMAKE_INSTALL_PREFIX /usr)
|
||||
set (CLICKHOUSE_ETC_DIR /etc)
|
||||
else ()
|
||||
set (CLICKHOUSE_ETC_DIR ${CMAKE_INSTALL_PREFIX}/etc)
|
||||
endif ()
|
||||
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libcityhash/include/)
|
||||
|
@ -295,7 +295,6 @@ configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake
|
||||
DESTINATION
|
||||
"lib/cmake/${PROJECT_NAME}"
|
||||
COMPONENT
|
||||
|
@ -14,7 +14,10 @@ endif ()
|
||||
find_library (ANL_LIB NAMES ${ANL_LIB_NAME})
|
||||
|
||||
# better use Threads::Threads but incompatible with cmake < 3
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${ANL_LIB} ${CMAKE_THREAD_LIBS_INIT})
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
if (ANL_LIB)
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${ANL_LIB})
|
||||
endif ()
|
||||
|
||||
check_cxx_source_runs("
|
||||
#include <netdb.h>
|
||||
|
@ -35,7 +35,7 @@ endif ()
|
||||
|
||||
add_library (clickhouse-client Client.cpp)
|
||||
target_link_libraries (clickhouse-client dbms ${LINE_EDITING_LIBS} ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
install (FILES config.xml DESTINATION /etc/clickhouse-client COMPONENT clickhouse-client)
|
||||
install (FILES config.xml DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-client COMPONENT clickhouse-client)
|
||||
|
||||
add_library (clickhouse-benchmark Benchmark.cpp)
|
||||
target_link_libraries (clickhouse-benchmark dbms ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
|
@ -29,20 +29,22 @@ install_symlink_to_clickhouse(clickhouse-benchmark)
|
||||
|
||||
INSTALL(
|
||||
FILES config.xml users.xml
|
||||
DESTINATION /etc/clickhouse-server
|
||||
DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-server
|
||||
COMPONENT clickhouse)
|
||||
|
||||
INSTALL(
|
||||
FILES ${CLICKHOUSE_PRIVATE_DIR}/Server/metrika/config.xml ${CLICKHOUSE_PRIVATE_DIR}/Server/metrika/users.xml
|
||||
DESTINATION /etc/clickhouse-server/metrika
|
||||
DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-server/metrika
|
||||
COMPONENT clickhouse
|
||||
OPTIONAL)
|
||||
|
||||
INSTALL(
|
||||
FILES metrika.conf
|
||||
DESTINATION /etc/security/limits.d
|
||||
COMPONENT clickhouse)
|
||||
if (NOT CMAKE_SYSTEM MATCHES "FreeBSD")
|
||||
INSTALL(
|
||||
FILES metrika.conf
|
||||
DESTINATION /etc/security/limits.d
|
||||
COMPONENT clickhouse)
|
||||
|
||||
# Adding init.d support
|
||||
include (${ClickHouse_SOURCE_DIR}/cmake/create_init_script.cmake)
|
||||
create_init_script (clickhouse-server clickhouse-server)
|
||||
# Adding init.d support
|
||||
include (${ClickHouse_SOURCE_DIR}/cmake/create_init_script.cmake)
|
||||
create_init_script (clickhouse-server clickhouse-server)
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user