From d8c5b53185058cbd08a2fce4d15de6a9b29d39bb Mon Sep 17 00:00:00 2001 From: Ivan Zhakov Date: Mon, 23 Sep 2024 09:01:54 +0000 Subject: [PATCH] CMake: Use imported targets for Iconv library. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1920852 13f79535-47bb-0310-9956-ffa450edef68 --- CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15d3a3ab85..ab211b2c7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,10 +149,8 @@ ELSEIF(APU_USE_XMLLITE) ENDIF() IF(APU_HAVE_ICONV) - SET(XLATE_INCLUDE_DIR ${Iconv_INCLUDE_DIRS}) - SET(XLATE_LIBRARIES ${Iconv_LIBRARIES}) + SET(XLATE_LIBRARIES Iconv::Iconv) ELSE() - SET(XLATE_INCLUDE_DIR "") SET(XLATE_LIBRARIES "") ENDIF() # Generated .h files are stored in PROJECT_BINARY_DIR, not the @@ -550,7 +548,7 @@ IF (BUILD_SHARED_LIBS) PRIVATE "APR_DECLARE_EXPORT" INTERFACE "APR_DECLARE_IMPORT") TARGET_INCLUDE_DIRECTORIES(${apr_libname} - PRIVATE ${APR_INCLUDE_DIRECTORIES} ${XLATE_INCLUDE_DIR} + PRIVATE ${APR_INCLUDE_DIRECTORIES} INTERFACE $ ${APR_INCLUDE_DIRECTORIES} ) ADD_DEPENDENCIES(${apr_libname} test_char_header) @@ -564,7 +562,7 @@ ELSE() PRIVATE "APR_DECLARE_STATIC" INTERFACE "APR_DECLARE_STATIC") TARGET_INCLUDE_DIRECTORIES(${apr_libname} - PRIVATE ${APR_INCLUDE_DIRECTORIES} ${XLATE_INCLUDE_DIR} + PRIVATE ${APR_INCLUDE_DIRECTORIES} INTERFACE $ ${APR_INCLUDE_DIRECTORIES} ) ADD_DEPENDENCIES(${apr_libname} test_char_header)