Skip to content
Permalink
Browse files
update fake grass library build on windows
  • Loading branch information
jef-n committed Dec 9, 2012
1 parent 1c14bea commit afde3531a4acf04d7e14d401859b1026dd847946
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/providers/grass/CMakeLists.txt
@@ -129,7 +129,6 @@ LIST ( APPEND PROTOTYPES "#define GRASS_GISDEFS_H\n" )
LIST ( APPEND PROTOTYPES "extern \"C\"\n" )
LIST ( APPEND PROTOTYPES "{\n" )
LIST ( APPEND PROTOTYPES "#include <grass/gis.h>\n" )
LIST ( APPEND PROTOTYPES "}\n" )
LIST ( APPEND PROTOTYPES "int GRASS_LIB_EXPORT G_set_error_routine(int (*)(const char *, int))\;\n" )

SET ( FUNCTIONS_MAP "// Auto generated by cmake, do not edit\n" )
@@ -183,12 +182,17 @@ FOREACH( ROW ${HEADER_FILE} )
ENDFOREACH ( FN )
ENDFOREACH( ROW )

LIST ( APPEND PROTOTYPES "}\n" )

FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.cpp" ${FUNCTIONS_MAP})
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.h" ${PROTOTYPES})


# Build fake library
SET (FAKE_LIB_GRASS_GIS "grass_gis.${GRASS_VERSION}")
IF(MSVC)
SET (FAKE_LIB_GRASS_GIS "libgrass_gis.${GRASS_VERSION}")
ELSE(MSVC)
SET (FAKE_LIB_GRASS_GIS "grass_gis.${GRASS_VERSION}")
ENDIF(MSVC)
ADD_LIBRARY( ${FAKE_LIB_GRASS_GIS} MODULE qgsgrassgislib.cpp qgsgrassgislibfunctions.cpp )

SET_TARGET_PROPERTIES(${FAKE_LIB_GRASS_GIS} PROPERTIES

0 comments on commit afde353

Please sign in to comment.