diff --git a/contrib/libdivide/CMakeLists.txt b/contrib/libdivide/CMakeLists.txt index 57e9f254db5..45cbc0a584b 100644 --- a/contrib/libdivide/CMakeLists.txt +++ b/contrib/libdivide/CMakeLists.txt @@ -1,2 +1,3 @@ -add_library (libdivide INTERFACE) -target_include_directories (libdivide SYSTEM BEFORE INTERFACE .) +add_library (_libdivide INTERFACE) +target_include_directories (_libdivide SYSTEM BEFORE INTERFACE .) +add_library (ch_contrib::libdivide ALIAS _libdivide) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 413deec6a4a..9d371258b8f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -261,7 +261,7 @@ endif() if (MAKE_STATIC_LIBRARIES OR NOT SPLIT_SHARED_LIBRARIES) add_library (dbms STATIC ${dbms_headers} ${dbms_sources}) - target_link_libraries (dbms PRIVATE libdivide ${DBMS_COMMON_LIBRARIES}) + target_link_libraries (dbms PRIVATE ch_contrib::libdivide ${DBMS_COMMON_LIBRARIES}) if (TARGET ch_contrib::jemalloc) target_link_libraries (dbms PRIVATE ch_contrib::jemalloc) endif() @@ -269,7 +269,7 @@ if (MAKE_STATIC_LIBRARIES OR NOT SPLIT_SHARED_LIBRARIES) else() add_library (dbms SHARED ${dbms_headers} ${dbms_sources}) target_link_libraries (dbms PUBLIC ${all_modules} ${DBMS_COMMON_LIBRARIES}) - target_link_libraries (clickhouse_interpreters PRIVATE libdivide) + target_link_libraries (clickhouse_interpreters PRIVATE ch_contrib::libdivide) if (TARGET ch_contrib::jemalloc) target_link_libraries (clickhouse_interpreters PRIVATE ch_contrib::jemalloc) endif() diff --git a/src/Functions/divide/CMakeLists.txt b/src/Functions/divide/CMakeLists.txt index e5a10f0817c..03c2faaf3cf 100644 --- a/src/Functions/divide/CMakeLists.txt +++ b/src/Functions/divide/CMakeLists.txt @@ -3,17 +3,17 @@ if (ARCH_AMD64) add_library(divide_impl_sse2 divideImpl.cpp) target_compile_options(divide_impl_sse2 PRIVATE -msse2 -DNAMESPACE=SSE2) - target_link_libraries(divide_impl_sse2 libdivide) + target_link_libraries(divide_impl_sse2 ch_contrib::libdivide) add_library(divide_impl_avx2 divideImpl.cpp) target_compile_options(divide_impl_avx2 PRIVATE -mavx2 -DNAMESPACE=AVX2) - target_link_libraries(divide_impl_avx2 libdivide) + target_link_libraries(divide_impl_avx2 ch_contrib::libdivide) set(IMPLEMENTATIONS divide_impl_sse2 divide_impl_avx2) else () add_library(divide_impl_generic divideImpl.cpp) target_compile_options(divide_impl_generic PRIVATE -DNAMESPACE=Generic) - target_link_libraries(divide_impl_generic libdivide) + target_link_libraries(divide_impl_generic ch_contrib::libdivide) set(IMPLEMENTATIONS divide_impl_generic) endif ()