Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cmake entries for spatialite in android
  • Loading branch information
mbernasocchi committed Jul 25, 2011
1 parent 49e9a62 commit 8c4cf8e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -114,7 +114,7 @@ ENDIF (NOT BISON_EXECUTABLE)
#############################################################
# search for dependencies

IF(NOT WIN32)
IF(NOT WIN32 AND NOT ANDROID)
INCLUDE(CheckFunctionExists)
CHECK_FUNCTION_EXISTS(openpty OPENPTY_IN_LIBC)
IF(NOT OPENPTY_IN_LIBC)
Expand All @@ -127,7 +127,7 @@ IF(NOT WIN32)
MESSAGE (SEND_ERROR "openpty not found!")
ENDIF(NEED_LIBUTIL)
ENDIF(NOT OPENPTY_IN_LIBC)
ENDIF(NOT WIN32)
ENDIF(NOT WIN32 AND NOT ANDROID)

# required
FIND_PACKAGE(Proj)
Expand Down
7 changes: 5 additions & 2 deletions src/core/CMakeLists.txt
Expand Up @@ -481,9 +481,12 @@ IF (WITH_INTERNAL_SPATIALITE)
IF (WIN32 OR APPLE)
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
ENDIF (WIN32 OR APPLE)
IF (UNIX)
IF (ANDROID)
TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY} ${CMAKE_DL_LIBS})
ENDIF (ANDROID)
IF (UNIX AND NOT ANDROID)
TARGET_LINK_LIBRARIES(qgis_core pthread ${CMAKE_DL_LIBS})
ENDIF (UNIX)
ENDIF (UNIX AND NOT ANDROID)
ELSE (WITH_INTERNAL_SPATIALITE)
TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})
ENDIF (WITH_INTERNAL_SPATIALITE)
Expand Down
8 changes: 4 additions & 4 deletions src/core/spatialite/spatialite.c
Expand Up @@ -81,10 +81,10 @@ extern const char * locale_charset (void);
#include <localcharset.h>
#endif /* end localcharset */
#else /* not WINDOWS */
#ifdef __APPLE__
#if defined(__APPLE__) || defined(__ANDROID__)
#include <iconv.h>
#include <localcharset.h>
#else /* not Mac OsX */
#else /* neither Mac OsX nor Android */
#include <iconv.h>
#include <langinfo.h>
#endif
Expand Down Expand Up @@ -8750,9 +8750,9 @@ gaiaGetLocaleCharset ()
#if defined(__MINGW32__) || defined(_WIN32)
return locale_charset ();
#else /* not MINGW32 - WIN32 */
#ifdef __APPLE__
#if defined(__APPLE__) || defined(__ANDROID__)
return locale_charset ();
#else /* not Mac OsX */
#else /* neither Mac OsX nor Android */
return nl_langinfo (CODESET);
#endif
#endif
Expand Down

0 comments on commit 8c4cf8e

Please sign in to comment.