2016-10-31 19:54:49 +00:00
|
|
|
add_library(clickhouse-server
|
2016-02-07 21:58:58 +00:00
|
|
|
Server.cpp
|
|
|
|
HTTPHandler.cpp
|
|
|
|
TCPHandler.cpp
|
|
|
|
InterserverIOHTTPHandler.cpp
|
|
|
|
MetricsTransmitter.cpp
|
2016-10-11 14:37:27 +00:00
|
|
|
ConfigReloader.cpp
|
2016-02-07 21:58:58 +00:00
|
|
|
StatusFile.cpp
|
2016-10-25 12:14:27 +00:00
|
|
|
ReplicasStatusHandler.cpp
|
2016-10-31 19:54:49 +00:00
|
|
|
)
|
|
|
|
target_link_libraries(clickhouse-server daemon)
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2016-10-31 19:54:49 +00:00
|
|
|
add_library(clickhouse-local LocalServer.cpp)
|
|
|
|
target_link_libraries(clickhouse-local dbms)
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2016-10-31 19:54:49 +00:00
|
|
|
add_executable(clickhouse main.cpp)
|
2016-11-11 17:01:02 +00:00
|
|
|
target_link_libraries(clickhouse clickhouse-server clickhouse-client clickhouse-local clickhouse-benchmark)
|
2016-10-31 19:54:49 +00:00
|
|
|
INSTALL(TARGETS clickhouse RUNTIME DESTINATION bin COMPONENT clickhouse)
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2016-11-11 17:01:02 +00:00
|
|
|
# make symbolic links to concrete clickhouse applications
|
2016-11-14 15:29:33 +00:00
|
|
|
macro(install_symlink_to_clickhouse app)
|
|
|
|
INSTALL(CODE "execute_process(COMMAND ln -sf clickhouse ${app} WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin\" )" COMPONENT ${app})
|
|
|
|
endmacro(make_symlink_to_clickhouse)
|
|
|
|
|
|
|
|
install_symlink_to_clickhouse(clickhouse-server)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-client)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-local)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-benchmark)
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2016-02-08 21:20:55 +00:00
|
|
|
INSTALL(
|
|
|
|
FILES config.xml users.xml
|
|
|
|
DESTINATION /etc/clickhouse-server
|
2016-10-31 19:54:49 +00:00
|
|
|
COMPONENT clickhouse)
|
2016-02-08 21:20:55 +00:00
|
|
|
|
|
|
|
INSTALL(
|
2016-03-01 17:53:26 +00:00
|
|
|
FILES ${CLICKHOUSE_PRIVATE_DIR}/Server/metrika/config.xml ${CLICKHOUSE_PRIVATE_DIR}/Server/metrika/users.xml
|
2016-02-08 21:20:55 +00:00
|
|
|
DESTINATION /etc/clickhouse-server/metrika
|
2016-10-31 19:54:49 +00:00
|
|
|
COMPONENT clickhouse
|
2016-02-08 21:20:55 +00:00
|
|
|
OPTIONAL)
|
|
|
|
|
|
|
|
INSTALL(
|
|
|
|
FILES metrika.conf
|
|
|
|
DESTINATION /etc/security/limits.d
|
2016-10-31 19:54:49 +00:00
|
|
|
COMPONENT clickhouse)
|
2016-02-08 21:20:55 +00:00
|
|
|
|
2016-10-31 19:54:49 +00:00
|
|
|
# Adding init.d support
|
|
|
|
INCLUDE(${PROJECT_SOURCE_DIR}/tools/init.d/CMakeLists.init)
|
2016-02-07 21:58:58 +00:00
|
|
|
CREATE_INIT_SCRIPT(clickhouse-server clickhouse-server)
|