summaryrefslogtreecommitdiff
path: root/plugins/mapexport
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-03-09 19:46:21 +0400
committerAlexander Gavrilov2012-03-09 19:46:21 +0400
commitedf77cf270e3ff7c4a08cd85fcaf537b254f6273 (patch)
treeea12836902f56ce46460377eb7aa5f5b35f4f151 /plugins/mapexport
parent9b071097de73dc19e5f3d5be31134810bad3e6f7 (diff)
downloaddfhack-edf77cf270e3ff7c4a08cd85fcaf537b254f6273.tar.gz
dfhack-edf77cf270e3ff7c4a08cd85fcaf537b254f6273.tar.bz2
dfhack-edf77cf270e3ff7c4a08cd85fcaf537b254f6273.tar.xz
Link protobuf to dfhack core as a shared library.
- Change protobuf libraries to build as DLLs. - Move some stream features to the lite library. - Install the lite library and use it from dfhack. Note that: - A couple of protobuf headers had to be tweaked. - The lite library is used because the full one is absolutely incompatible with reloading plugins. - Shutting down protobuf also can't be allowed.
Diffstat (limited to 'plugins/mapexport')
-rw-r--r--plugins/mapexport/CMakeLists.txt14
-rw-r--r--plugins/mapexport/mapexport.cpp1
2 files changed, 2 insertions, 13 deletions
diff --git a/plugins/mapexport/CMakeLists.txt b/plugins/mapexport/CMakeLists.txt
index d3ff2585..bebdd08e 100644
--- a/plugins/mapexport/CMakeLists.txt
+++ b/plugins/mapexport/CMakeLists.txt
@@ -1,15 +1,5 @@
PROJECT(mapexport)
-INCLUDE_DIRECTORIES (
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${dfhack_SOURCE_DIR}/library/depends/protobuf/
- ${dfhack_SOURCE_DIR}/library/depends/zlib/
-)
-
-LINK_DIRECTORIES(
- ${dfhack_SOURCE_DIR}/library/depends/zlib/
-)
-
#The protobuf sources we generate will require these headers
SET(PROJECT_HDRS
${dfhack_SOURCE_DIR}/library/depends/protobuf/google/protobuf/stubs/once.h
@@ -51,7 +41,7 @@ DEPENDS protoc-bin ${PROJECT_PROTOS}
)
IF(WIN32)
- DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf zlib)
+ DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf-lite)
ELSE()
- DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf z)
+ DFHACK_PLUGIN(mapexport ${PROJECT_SRCS} ${PROJECT_HDRS} LINK_LIBRARIES protobuf-lite)
ENDIF()
diff --git a/plugins/mapexport/mapexport.cpp b/plugins/mapexport/mapexport.cpp
index 2e519771..ea7b8894 100644
--- a/plugins/mapexport/mapexport.cpp
+++ b/plugins/mapexport/mapexport.cpp
@@ -37,7 +37,6 @@ DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand>
DFhackCExport command_result plugin_shutdown ( Core * c )
{
- google::protobuf::ShutdownProtobufLibrary();
return CR_OK;
}