Cmake: dont touch CMAKE_INSTALL_PREFIX

This commit is contained in:
proller 2017-04-05 15:19:05 +03:00 committed by alexey-milovidov
parent 9848fdf2ed
commit 13e9b5c949
2 changed files with 3 additions and 4 deletions

View File

@ -137,9 +137,8 @@ if (ENABLE_TESTS)
add_subdirectory (dbms/tests) add_subdirectory (dbms/tests)
endif (ENABLE_TESTS) endif (ENABLE_TESTS)
# Installation prefix # when installing to /usr - place configs to /etc but for /usr/local place to /usr/local/etc
if (NOT CMAKE_SYSTEM MATCHES "FreeBSD") if (CMAKE_INSTALL_PREFIX MATCHES "/usr")
set (CMAKE_INSTALL_PREFIX /usr)
set (CLICKHOUSE_ETC_DIR /etc) set (CLICKHOUSE_ETC_DIR /etc)
else () else ()
set (CLICKHOUSE_ETC_DIR ${CMAKE_INSTALL_PREFIX}/etc) set (CLICKHOUSE_ETC_DIR ${CMAKE_INSTALL_PREFIX}/etc)

2
debian/rules vendored
View File

@ -23,7 +23,7 @@ CC := $(DEB_HOST_GNU_TYPE)-$(DEB_CC)$(DEB_COMPILER_VERSION)
CXX := $(DEB_HOST_GNU_TYPE)-$(DEB_CXX)$(DEB_COMPILER_VERSION) CXX := $(DEB_HOST_GNU_TYPE)-$(DEB_CXX)$(DEB_COMPILER_VERSION)
endif endif
CMAKE_FLAGS ?= -DCMAKE_CXX_COMPILER=`which $(CXX)` -DCMAKE_C_COMPILER=`which $(CC)` $(CMAKE_FLAGS_ADD) CMAKE_FLAGS ?= -DCMAKE_CXX_COMPILER=`which $(CXX)` -DCMAKE_C_COMPILER=`which $(CC)` -DCMAKE_INSTALL_PREFIX=/usr $(CMAKE_FLAGS_ADD)
ifdef CMAKE_BUILD_TYPE ifdef CMAKE_BUILD_TYPE
CMAKE_FLAGS += -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) CMAKE_FLAGS += -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)