nixpkgs/pkgs/development/libraries/arrow-cpp/double-conversion_cmake.patch

44 lines
1.4 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/cpp/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -615,7 +615,7 @@ endif(UNIX)
set(ARROW_LINK_LIBS)
# Libraries to link statically with libarrow.so
-set(ARROW_STATIC_LINK_LIBS double-conversion)
+set(ARROW_STATIC_LINK_LIBS ${DOUBLE_CONVERSION_TARGET})
if (ARROW_WITH_BROTLI)
SET(ARROW_STATIC_LINK_LIBS
@@ -694,7 +694,7 @@ else ()
set(ARROW_MIN_TEST_LIBS
arrow_shared
${ARROW_LINK_LIBS}
- double-conversion
+ ${DOUBLE_CONVERSION_TARGET}
${BOOST_SYSTEM_LIBRARY}
${BOOST_FILESYSTEM_LIBRARY}
${BOOST_REGEX_LIBRARY}
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -469,14 +469,16 @@ if("${DOUBLE_CONVERSION_HOME}" STREQUAL "")
set(DOUBLE_CONVERSION_VENDORED 1)
else()
find_package(double-conversion REQUIRED)
+ set(DOUBLE_CONVERSION_TARGET double-conversion::double-conversion)
set(DOUBLE_CONVERSION_VENDORED 0)
endif()
include_directories(SYSTEM ${DOUBLE_CONVERSION_INCLUDE_DIR})
-ADD_THIRDPARTY_LIB(double-conversion
- STATIC_LIB ${DOUBLE_CONVERSION_STATIC_LIB})
if (DOUBLE_CONVERSION_VENDORED)
+ ADD_THIRDPARTY_LIB(double-conversion
+ STATIC_LIB ${DOUBLE_CONVERSION_STATIC_LIB})
+ set(DOUBLE_CONVERSION_TARGET double-conversion)
add_dependencies(arrow_dependencies double-conversion_ep)
endif()