Skip to content

Commit

Permalink
CMake: Use imported targets for Iconv library.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1920852 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 23, 2024
1 parent d148082 commit d8c5b53
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $<INSTALL_INTERFACE:${APR_INSTALL_INCLUDE_DIR}> ${APR_INCLUDE_DIRECTORIES}
)
ADD_DEPENDENCIES(${apr_libname} test_char_header)
Expand All @@ -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 $<INSTALL_INTERFACE:${APR_INSTALL_INCLUDE_DIR}> ${APR_INCLUDE_DIRECTORIES}
)
ADD_DEPENDENCIES(${apr_libname} test_char_header)
Expand Down

0 comments on commit d8c5b53

Please sign in to comment.