ClickHouse/dbms/src/Server/CMakeLists.txt

49 lines
1.6 KiB
CMake
Raw Normal View History

add_library(clickhouse-server
2016-02-07 21:58:58 +00:00
Server.cpp
HTTPHandler.cpp
TCPHandler.cpp
InterserverIOHTTPHandler.cpp
MetricsTransmitter.cpp
ConfigReloader.cpp
2016-02-07 21:58:58 +00:00
StatusFile.cpp
ReplicasStatusHandler.cpp
)
target_link_libraries(clickhouse-server daemon)
2016-02-07 21:58:58 +00:00
add_library(clickhouse-local LocalServer.cpp)
target_link_libraries(clickhouse-local dbms)
2016-02-07 21:58:58 +00:00
add_executable(clickhouse main.cpp)
target_link_libraries(clickhouse clickhouse-server clickhouse-client clickhouse-local clickhouse-benchmark)
INSTALL(TARGETS clickhouse RUNTIME DESTINATION bin COMPONENT clickhouse)
2016-02-07 21:58:58 +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
INSTALL(
FILES config.xml users.xml
DESTINATION /etc/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
COMPONENT clickhouse
OPTIONAL)
INSTALL(
FILES metrika.conf
DESTINATION /etc/security/limits.d
COMPONENT clickhouse)
# 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)