Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freebsd: preparing port, misc build/install chandes #327

Merged
merged 1 commit into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
1 change: 0 additions & 1 deletion contrib/libpoco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion contrib/libpoco/Net/cmake/test_anl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
20 changes: 11 additions & 9 deletions dbms/src/Server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()