Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into cache_flush_helpe…
Browse files Browse the repository at this point in the history
…r_callback
  • Loading branch information
chacha21 committed Nov 19, 2021
2 parents 88467ca + a663c88 commit 8090b5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmake/helpers/CheckDependentLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include(CheckFunctionExists)
include(CMakeDependentOption)
include(FeatureSummary)
include(DefineFindPackage2)
include(CheckSymbolExists)

# Macro to declare a package
# Accept a CAN_DISABLE option to specify that the package can be disabled
Expand Down Expand Up @@ -264,7 +265,7 @@ endif()
# 3rd party libraries

gdal_check_package(PCRE2 "Enable PCRE2 support for sqlite3" CAN_DISABLE)
if(NOT GDAL_USE_PCRE)
if(NOT GDAL_USE_PCRE2)
gdal_check_package(PCRE "Enable PCRE support for sqlite3" CAN_DISABLE)
endif()

Expand Down
10 changes: 8 additions & 2 deletions port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,14 @@ if (GDAL_USE_ICONV)
target_sources(cpl PRIVATE cpl_recode_iconv.cpp)
else ()
if (APPLE)
target_compile_definitions(cpl PRIVATE -DLIBICONV_PLUG)
endif ()
# linkage against OSX's system iconv is going to require LIBICONV_PLUG to be defined, but other self-built
# situations like CondaForge or Homebrew might not need this
set(CMAKE_REQUIRED_LIBRARIES ${Iconv_LIBRARY})
check_symbol_exists(_iconv_close "iconv.h" HAVE_ICONV_CLOSE)
if (HAVE_ICONV_CLOSE)
target_compile_definitions(cpl PRIVATE -DLIBICONV_PLUG)
endif (HAVE_ICONV_CLOSE)
endif (APPLE)
target_sources(cpl PRIVATE cpl_recode_iconv.cpp)
target_include_directories(cpl PRIVATE $<TARGET_PROPERTY:Iconv::Iconv,INTERFACE_INCLUDE_DIRECTORIES>)
gdal_add_private_link_libraries(Iconv::Iconv)
Expand Down

0 comments on commit 8090b5d

Please sign in to comment.