Fixed mapexport build on Linux.

develop
Mike Stewart 2012-01-31 08:42:25 -08:00
parent dcc02506b7
commit 09f197fa6d
3 changed files with 9 additions and 5 deletions

@ -1 +1 @@
Subproject commit 867e7de022af7a5cc623b360ae2b864df395316f
Subproject commit 200131405d59142e6121d76cf5cb097a1f07694b

@ -48,4 +48,8 @@ COMMAND protoc-bin -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/ --cpp_out=${CMAKE_CURRE
DEPENDS protoc-bin ${PROJECT_PROTOS}
)
DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf zlib)
IF(WIN32)
DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf zlib)
ELSE()
DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf z)
ENDIF()

@ -81,10 +81,10 @@ DFhackCExport command_result mapexport (Core * c, std::vector <std::string> & pa
return CR_FAILURE;
}
ZeroCopyOutputStream *raw_output = new OstreamOutputStream(&output_file);
GzipOutputStream *zip_output = new GzipOutputStream(raw_output);
GzipOutputStream *zip_output = new GzipOutputStream(raw_output);
CodedOutputStream *coded_output = new CodedOutputStream(zip_output);
coded_output->WriteLittleEndian32(0x50414DDF); //Write our file header
coded_output->WriteLittleEndian32(0x50414DDF); //Write our file header
Maps::getSize(x_max, y_max, z_max);
MapExtras::MapCache map;