Skip to content

Commit

Permalink
detect iconv on macosx
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10488 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 6, 2009
1 parent 472848e commit 1bfc5c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -57,9 +57,9 @@ IF (WITH_SPATIALITE)
IF(WITH_INTERNAL_SPATIALITE)
SET(SPATIALITE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/spatialite/headers)
SET(HAVE_SPATIALITE TRUE)
IF(WIN32)
IF(WIN32 OR APPLE)
FIND_PACKAGE(Iconv REQUIRED)
ENDIF(WIN32)
ENDIF(WIN32 OR APPLE)
ENDIF (WITH_INTERNAL_SPATIALITE)
ENDIF (WITH_SPATIALITE)

Expand Down
4 changes: 4 additions & 0 deletions cmake/FindIconv.cmake
Expand Up @@ -13,6 +13,8 @@
# searching for the same item do nothing.
FIND_PATH(ICONV_INCLUDE_DIR iconv.h
"$ENV{LIB_DIR}/include"
/usr/local/include
/usr/include
#mingw
c:/msys/local/include
NO_DEFAULT_PATH
Expand All @@ -21,6 +23,8 @@ FIND_PATH(ICONV_INCLUDE_DIR iconv.h)

FIND_LIBRARY(ICONV_LIBRARY NAMES iconv PATHS
"$ENV{LIB_DIR}/lib"
/usr/local/lib
/usr/lib
#mingw
c:/msys/local/lib
NO_DEFAULT_PATH
Expand Down
8 changes: 5 additions & 3 deletions src/core/CMakeLists.txt
Expand Up @@ -110,8 +110,10 @@ SET(QGIS_CORE_SRCS
)

IF (WITH_INTERNAL_SPATIALITE)
IF (WIN32)
IF (WIN32 OR APPLE)
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
ENDIF (WIN32 OR APPLE)
IF (WIN32)
ADD_DEFINITIONS(-DDLL_EXPORT)
IF (MSVC)
ADD_DEFINITIONS("-DSQLITE_API=__declspec(dllexport)")
Expand Down Expand Up @@ -294,9 +296,9 @@ TARGET_LINK_LIBRARIES(qgis_core
)

IF (WITH_INTERNAL_SPATIALITE)
IF (WIN32)
IF (WIN32 OR APPLE)
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
ENDIF (WIN32)
ENDIF (WIN32 OR APPLE)
ELSE (WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})
ENDIF (WITH_INTERNAL_SPATIALITE)
Expand Down

0 comments on commit 1bfc5c6

Please sign in to comment.