Skip to content
Permalink
Browse files

fix grass <7.1 build

  • Loading branch information
jef-n committed Oct 17, 2015
1 parent ab943f8 commit 6496bc4955639cf764cc9718672ab5126be96c91
Showing with 9 additions and 3 deletions.
  1. +7 −1 src/providers/grass/CMakeLists.txt
  2. +2 −2 src/providers/grass/qgsgrassprovider.cpp
@@ -58,14 +58,20 @@ MACRO(ADD_GRASSLIB GRASS_BUILD_VERSION)
${GRASS_LIBRARY_UIS_H}
)

IF(GRASS_OFF_T_SIZE)
SET(GRASS_OFF_T_SIZE_DEF "\"-DGRASS_OFF_T_SIZE=${GRASS_OFF_T_SIZE}\"")
ELSE(GRASS_OFF_T_SIZE)
SET(GRASS_OFF_T_SIZE_DEF "")
ENDIF(GRASS_OFF_T_SIZE)

SET_TARGET_PROPERTIES(qgisgrass${GRASS_BUILD_VERSION} PROPERTIES
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis2_grass
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" \"-DGRASS_LIB_EXPORT=${DLLEXPORT}\" \"-DGRASS_EXPORT=${DLLIMPORT}\" \"-DGRASS_OFF_T_SIZE=${GRASS_OFF_T_SIZE}\""
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" \"-DGRASS_LIB_EXPORT=${DLLEXPORT}\" \"-DGRASS_EXPORT=${DLLIMPORT}\" ${GRASS_OFF_T_SIZE_DEF}"
)

IF (APPLE)
@@ -86,9 +86,9 @@ typedef int Vect_delete_line_function_type( struct Map_info *, int );
#ifdef Q_OS_WIN
typedef qint64 grass_off_t;
#else
#if GRASS_OFF_T_SIZE == 4
#if defined(GRASS_OFF_T_SIZE) && GRASS_OFF_T_SIZE == 4
typedef qint32 grass_off_t;
#elif GRASS_OFF_T_SIZE == 8
#elif defined(GRASS_OFF_T_SIZE) && GRASS_OFF_T_SIZE == 8
typedef qint64 grass_off_t;
#else
typedef off_t grass_off_t; // GRASS_OFF_T_SIZE undefined, default to off_t

0 comments on commit 6496bc4

Please sign in to comment.
You can’t perform that action at this time.