Skip to content

Commit

Permalink
Don't search for iconv library if we aren't building for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
who-biz committed Feb 7, 2023
1 parent f457c38 commit e52abd4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -969,14 +969,17 @@ endif()
add_subdirectory(contrib)
add_subdirectory(src)

find_library(ICONV_LIBRARY iconv)
if (WIN32)
find_library(ICONV_LIBRARY iconv)

if(ICONV_LIBRARY)
set(ICONV_LIBRARY "${ICONV_LIBRARY}")
message("Using iconv library located at: ${ICONV_LIBRARY}.")
if(ICONV_LIBRARY)
set(ICONV_LIBRARY "${ICONV_LIBRARY}")
message("Using iconv library located at: ${ICONV_LIBRARY}.")
endif()
else()
message("Not using iconv library, since we are not building for Windows.")
endif()


if(BUILD_TESTS)
add_subdirectory(tests)
endif()
Expand Down

0 comments on commit e52abd4

Please sign in to comment.