diff --git a/CMakeLists.txt b/CMakeLists.txt index 11829d8..dd40cec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,6 +104,7 @@ if (URL_USE_LIBS) endif() add_library(upa::url ALIAS upaurl) target_include_directories(upaurl PRIVATE ${ICU_INCLUDE_DIR}) + target_link_libraries(upaurl INTERFACE ICU::i18n ICU::uc) endif() # Test targets @@ -139,7 +140,7 @@ if (URL_BUILD_TESTS) get_filename_component(test_name ${file} NAME_WE) add_executable(${test_name} ${file}) - target_link_libraries(${test_name} upaurl ICU::i18n ICU::uc) + target_link_libraries(${test_name} upaurl) add_test(NAME ${test_name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test @@ -167,7 +168,7 @@ if (URL_BUILD_FUZZER) else() add_executable(${fuzz_name} ${file}) endif() - target_link_libraries(${fuzz_name} upaurl ICU::i18n ICU::uc) + target_link_libraries(${fuzz_name} upaurl) endforeach() endif() @@ -175,7 +176,7 @@ endif() if (URL_BUILD_EXAMPLES) add_executable(urlparse examples/urlparse.cpp) - target_link_libraries(urlparse upaurl ICU::i18n ICU::uc) + target_link_libraries(urlparse upaurl) endif() # Tool's targets