Skip to content

Commit 1ddc57b

Browse files
authored
Merge pull request libgit2#4402 from libgit2/ethomson/iconv
cmake: let USE_ICONV be optional on macOS
2 parents 06f3aa5 + bbb213c commit 1ddc57b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ OPTION( ENABLE_TRACE "Enables tracing support" OFF )
4343
OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF )
4444

4545
OPTION( USE_SHA1DC "Use SHA-1 with collision detection" OFF )
46-
OPTION( USE_ICONV "Link with and use iconv library" OFF )
4746
OPTION( USE_SSH "Link with libssh to enable SSH support" ON )
4847
OPTION( USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON )
4948
OPTION( USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF )
@@ -52,10 +51,15 @@ OPTION( CURL "Use curl for HTTP if available" ON)
5251
OPTION( USE_EXT_HTTP_PARSER "Use system HTTP_Parser if available" ON)
5352
OPTION( DEBUG_POOL "Enable debug pool allocator" OFF )
5453
OPTION( ENABLE_WERROR "Enable compilation with -Werror" OFF )
54+
OPTION( USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF )
55+
5556
IF (UNIX AND NOT APPLE)
5657
OPTION( ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF )
5758
ENDIF()
58-
OPTION( USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF )
59+
60+
IF (APPLE)
61+
OPTION( USE_ICONV "Link with and use iconv library" ON )
62+
ENDIF()
5963

6064
IF(MSVC)
6165
# This option is only available when building with MSVC. By default, libgit2

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ ENDIF()
310310
ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support")
311311

312312
# Optional external dependency: iconv
313-
IF (USE_ICONV OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
313+
IF (USE_ICONV)
314314
FIND_PACKAGE(Iconv)
315315
ENDIF()
316316
IF (ICONV_FOUND)

0 commit comments

Comments
 (0)