Skip to content

Commit afde353

Browse files
committedDec 9, 2012
update fake grass library build on windows
1 parent 1c14bea commit afde353

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎src/providers/grass/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ LIST ( APPEND PROTOTYPES "#define GRASS_GISDEFS_H\n" )
129129
LIST ( APPEND PROTOTYPES "extern \"C\"\n" )
130130
LIST ( APPEND PROTOTYPES "{\n" )
131131
LIST ( APPEND PROTOTYPES "#include <grass/gis.h>\n" )
132-
LIST ( APPEND PROTOTYPES "}\n" )
133132
LIST ( APPEND PROTOTYPES "int GRASS_LIB_EXPORT G_set_error_routine(int (*)(const char *, int))\;\n" )
134133

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

185+
LIST ( APPEND PROTOTYPES "}\n" )
186+
186187
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.cpp" ${FUNCTIONS_MAP})
187188
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.h" ${PROTOTYPES})
188189

189-
190190
# Build fake library
191-
SET (FAKE_LIB_GRASS_GIS "grass_gis.${GRASS_VERSION}")
191+
IF(MSVC)
192+
SET (FAKE_LIB_GRASS_GIS "libgrass_gis.${GRASS_VERSION}")
193+
ELSE(MSVC)
194+
SET (FAKE_LIB_GRASS_GIS "grass_gis.${GRASS_VERSION}")
195+
ENDIF(MSVC)
192196
ADD_LIBRARY( ${FAKE_LIB_GRASS_GIS} MODULE qgsgrassgislib.cpp qgsgrassgislibfunctions.cpp )
193197

194198
SET_TARGET_PROPERTIES(${FAKE_LIB_GRASS_GIS} PROPERTIES

0 commit comments

Comments
 (0)
Please sign in to comment.