about summary refs log tree commit diff
path: root/pkgs/games/dwarf-fortress/dfhack/use-system-libraries.patch
blob: e33fec9f87ecee0cab692bc21e843e9d5c3c7338 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 956edfc..fb0e6bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,8 +160,6 @@ ELSEIF(MSVC)
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od")
 ENDIF()
 
-# use shared libraries for protobuf
-ADD_DEFINITIONS(-DPROTOBUF_USE_DLLS)
 ADD_DEFINITIONS(-DLUA_BUILD_AS_DLL)
 
 if(APPLE)
@@ -182,10 +180,8 @@ else()
     set(ZLIB_ROOT /usr/lib/i386-linux-gnu)
 endif()
 find_package(ZLIB REQUIRED)
-include_directories(depends/protobuf)
 include_directories(depends/lua/include)
 include_directories(depends/md5)
-include_directories(depends/jsoncpp)
 
 # Support linking against external tinyxml
 # If we find an external tinyxml, set the DFHACK_TINYXML variable to "tinyxml"
diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt
index d8442b1..b47dc2a 100644
--- a/depends/CMakeLists.txt
+++ b/depends/CMakeLists.txt
@@ -1,7 +1,6 @@
 #list depends here.
 add_subdirectory(lua)
 add_subdirectory(md5)
-add_subdirectory(protobuf)
 
 # Don't build tinyxml if it's being externally linked against.
 if(NOT TinyXML_FOUND)
@@ -9,7 +8,6 @@ if(NOT TinyXML_FOUND)
 endif()
 
 add_subdirectory(tthread)
-add_subdirectory(jsoncpp)
 # build clsocket static and only as a dependency. Setting those options here overrides its own default settings.
 OPTION(CLSOCKET_SHARED "Build clsocket lib as shared." OFF)
 OPTION(CLSOCKET_DEP_ONLY "Build for use inside other CMake projects as dependency." ON)
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index d3e3480..5d4b572 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -223,10 +223,10 @@ LIST(APPEND PROJECT_SOURCES ${PROJECT_PROTO_SRCS})
 
 ADD_CUSTOM_COMMAND(
     OUTPUT ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS}
-    COMMAND protoc-bin -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/
+    COMMAND protoc -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/
             --cpp_out=dllexport_decl=DFHACK_EXPORT:${CMAKE_CURRENT_SOURCE_DIR}/proto/
             ${PROJECT_PROTOS}
-    DEPENDS protoc-bin ${PROJECT_PROTOS}
+    DEPENDS ${PROJECT_PROTOS}
 )
 
 # Merge headers into sources
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index c24b940..afeb888 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -47,11 +47,11 @@ STRING(REPLACE ".proto" ".pb.h" PROJECT_PROTO_HDRS "${PROJECT_PROTOS}")
 
 ADD_CUSTOM_COMMAND(
     OUTPUT ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS}
-    COMMAND protoc-bin -I=${dfhack_SOURCE_DIR}/library/proto/
+    COMMAND protoc -I=${dfhack_SOURCE_DIR}/library/proto/
                        -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/
             --cpp_out=${CMAKE_CURRENT_SOURCE_DIR}/proto/
             ${PROJECT_PROTOS}
-    DEPENDS protoc-bin ${PROJECT_PROTOS}
+    DEPENDS ${PROJECT_PROTOS}
 )
 add_custom_target(generate_proto DEPENDS ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS})
 
diff --git a/plugins/stockpiles/CMakeLists.txt b/plugins/stockpiles/CMakeLists.txt
index 713c3d6..dd2d4cb 100644
--- a/plugins/stockpiles/CMakeLists.txt
+++ b/plugins/stockpiles/CMakeLists.txt
@@ -33,8 +33,8 @@ LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS})
 #Generate sources from our proto files and store them in the source tree
 ADD_CUSTOM_COMMAND(
 OUTPUT ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS}
-COMMAND protoc-bin -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/ --cpp_out=${CMAKE_CURRENT_SOURCE_DIR}/proto/ ${PROJECT_PROTOS}
-DEPENDS protoc-bin ${PROJECT_PROTOS}
+COMMAND protoc -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/ --cpp_out=${CMAKE_CURRENT_SOURCE_DIR}/proto/ ${PROJECT_PROTOS}
+DEPENDS ${PROJECT_PROTOS}
 )
 
 IF(WIN32)