2022-07-21 03:09:05 +00:00
|
|
|
|
|
|
|
if (NOT(
|
|
|
|
CMAKE_HOST_SYSTEM_NAME STREQUAL CMAKE_SYSTEM_NAME
|
|
|
|
AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR
|
|
|
|
)
|
|
|
|
)
|
2023-05-18 15:23:39 +00:00
|
|
|
set (COMPRESSOR "${PROJECT_BINARY_DIR}/native/utils/self-extracting-executable/pre_compressor")
|
|
|
|
set (DECOMPRESSOR "--decompressor=${PROJECT_BINARY_DIR}/utils/self-extracting-executable/decompressor")
|
2022-07-21 03:09:05 +00:00
|
|
|
else ()
|
2023-05-18 15:23:39 +00:00
|
|
|
set (COMPRESSOR "${PROJECT_BINARY_DIR}/utils/self-extracting-executable/compressor")
|
2022-07-21 03:09:05 +00:00
|
|
|
endif ()
|
|
|
|
|
2024-07-01 09:24:45 +00:00
|
|
|
add_custom_target (self-extracting-server ALL
|
2023-11-11 06:27:10 +00:00
|
|
|
${CMAKE_COMMAND} -E remove clickhouse clickhouse-stripped
|
2022-07-21 03:09:05 +00:00
|
|
|
COMMAND ${COMPRESSOR} ${DECOMPRESSOR} clickhouse ../clickhouse
|
2023-11-11 06:27:10 +00:00
|
|
|
COMMAND ${COMPRESSOR} ${DECOMPRESSOR} clickhouse-stripped ../clickhouse-stripped
|
|
|
|
DEPENDS clickhouse clickhouse-stripped compressor
|
2022-06-27 05:36:27 +00:00
|
|
|
)
|
2024-07-01 09:24:45 +00:00
|
|
|
|
|
|
|
set(self_extracting_deps "self-extracting-server")
|
|
|
|
|
|
|
|
if (BUILD_STANDALONE_KEEPER)
|
|
|
|
add_custom_target (self-extracting-keeper ALL
|
|
|
|
${CMAKE_COMMAND} -E remove clickhouse-keeper
|
|
|
|
COMMAND ${COMPRESSOR} ${DECOMPRESSOR} clickhouse-keeper ../clickhouse-keeper
|
|
|
|
DEPENDS compressor clickhouse-keeper
|
|
|
|
)
|
|
|
|
list(APPEND self_extracting_deps "self-extracting-keeper")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_custom_target (self-extracting ALL
|
|
|
|
DEPENDS ${self_extracting_deps}
|
|
|
|
)
|