Skip to content

Commit

Permalink
update fake grass library build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Dec 9, 2012
1 parent 1c14bea commit afde353
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/providers/grass/CMakeLists.txt
Expand Up @@ -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" )
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit afde353

Please sign in to comment.