40 lines
1.2 KiB
Diff
Executable file
40 lines
1.2 KiB
Diff
Executable file
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 203fca7..65cc350 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -342,7 +342,8 @@ ENDIF()
|
|
|
|
IF(WITH_ICONV)
|
|
IF(NOT WIN32)
|
|
- INCLUDE(${CC_SOURCE_DIR}/cmake/FindIconv.cmake)
|
|
+ find_package(Iconv REQUIRED)
|
|
+ include_directories(${Iconv_INCLUDE_DIRS})
|
|
ENDIF()
|
|
ENDIF()
|
|
|
|
@@ -359,8 +360,8 @@ IF(WIN32)
|
|
SET(SYSTEM_LIBS ws2_32 advapi32 kernel32 shlwapi crypt32 ${LIBZ})
|
|
ELSE()
|
|
SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBPTHREAD} ${CMAKE_DL_LIBS} ${LIBM})
|
|
- IF(ICONV_EXTERNAL)
|
|
- SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${ICONV_LIBRARIES})
|
|
+ IF(WITH_ICONV)
|
|
+ SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${Iconv_LIBRARIES})
|
|
ENDIF()
|
|
ENDIF()
|
|
IF(WITH_SSL)
|
|
diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt
|
|
index 5bbf36b..70e619b 100644
|
|
--- a/mariadb_config/CMakeLists.txt
|
|
+++ b/mariadb_config/CMakeLists.txt
|
|
@@ -38,8 +38,8 @@ STRING(STRIP "${extra_dynamic_LDFLAGS}" extra_dynamic_LDFLAGS)
|
|
LIST(REMOVE_DUPLICATES extra_dynamic_LDFLAGS)
|
|
|
|
IF(UNIX AND NOT APPLE)
|
|
- IF(ICONV_EXTERNAL)
|
|
- GET_LIB_NAME(${ICONV_LIBRARIES} LIB_OUT)
|
|
+ IF(WITH_ICONV)
|
|
+ GET_LIB_NAME(${Iconv_LIBRARIES} LIB_OUT)
|
|
SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}")
|
|
ENDIF()
|
|
ENDIF()
|