From c0aff1e4db224a04eec9d167af4e30fd89dab25d Mon Sep 17 00:00:00 2001 From: Jamie Cui Date: Thu, 19 Dec 2024 22:55:05 +0800 Subject: [PATCH] chore(cmake): minor fix --- CMakeLists.txt | 3 +++ cmake/abseil.cmake | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7988d03..cb0a2ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,3 +160,6 @@ target_link_libraries(yacl PUBLIC # ExtLibtommath::libtommath # ExtFourQ::fourq ) + +# HACK for header only libraries, we need manually add dependencies +add_dependencies(yacl spdlog) diff --git a/cmake/abseil.cmake b/cmake/abseil.cmake index 10bb784..d8cfc79 100644 --- a/cmake/abseil.cmake +++ b/cmake/abseil.cmake @@ -30,7 +30,8 @@ ExternalProject_Add(abseil add_library(libabseil SHARED IMPORTED) set_property( TARGET libabseil PROPERTY - IMPORTED_LOCATION ${CMAKE_THIRDPARTY_LIBDIR}/libabseil_dll.dylib) + IMPORTED_LOCATION ${CMAKE_THIRDPARTY_LIBDIR}/libabseil_dll${CMAKE_SHARED_LIBRARY_SUFFIX}) + add_dependencies(libabseil abseil) add_library(External::absl ALIAS libabseil)