Skip to content

Commit

Permalink
Make upaurl dependent on ICU library in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Sep 24, 2023
1 parent 0a460fa commit 60b8d20
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -167,15 +168,15 @@ 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()

# Example's targets

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
Expand Down

0 comments on commit 60b8d20

Please sign in to comment.