From f1ead77a04cdd883cb6e53e9693697e17a1edb4e Mon Sep 17 00:00:00 2001 From: Rob Patro Date: Fri, 6 Sep 2019 19:11:39 -0400 Subject: [PATCH] some build changes --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c00c441b..5103e8cf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,6 +317,9 @@ else() endif() find_package(Iconv REQUIRED) +if(NOT Iconv_IS_BUILT_IN) + set(ICONV_LIB Iconv::Iconv) +endif() find_package(LibLZMA) if(NOT LIBLZMA_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e638a7058..ab1eded0d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -251,7 +251,6 @@ target_link_libraries(salmon ${LIBRT} ksw2pp ## PUFF_INTEGRATION - Iconv::Iconv alevin_core ${CMAKE_DL_LIBS} #asan @@ -265,9 +264,10 @@ target_link_libraries(unitTests alevin_core salmon_core gff + ${STADEN_LIBRARIES} ${Boost_LIBRARIES} ${ICU_LIBS} - ${STADEN_LIBRARIES} ${CURL_LIBRARIES} + ${CURL_LIBRARIES} ${ZLIB_LIBRARY} m ${LIBLZMA_LIBRARIES} @@ -275,13 +275,17 @@ target_link_libraries(unitTests ${TBB_LIBRARIES} ${LIBSALMON_LINKER_FLAGS} ${NON_APPLECLANG_LIBS} - Iconv::Iconv ${LIBRT} ${CMAKE_DL_LIBS} #asan #ubsan ) +if(NOT Iconv_IS_BUILT_IN) + target_link_libraries(unitTests Iconv::Iconv) + target_link_libraries(salmon Iconv::Iconv) +endif() + add_dependencies(salmon unitTests) ##