File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,25 @@ file(GLOB wpimath_proto_src src/main/proto/*.proto)
10
10
set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE )
11
11
add_library (wpimathproto ${wpimath_proto_src} )
12
12
13
- protobuf_generate (
14
- TARGET
15
- wpimathproto
16
- # EXPORT_MACRO?
17
- PROTOC_OUT_DIR
18
- "${CMAKE_CURRENT_BINARY_DIR} /protobuf"
19
- APPEND_PATH
20
- )
13
+ if (MSVC )
14
+ protobuf_generate (
15
+ TARGET
16
+ wpimathproto
17
+ EXPORT_MACRO
18
+ "__declspec(dllexport)"
19
+ PROTOC_OUT_DIR
20
+ "${CMAKE_CURRENT_BINARY_DIR} /protobuf"
21
+ APPEND_PATH
22
+ )
23
+ else ()
24
+ protobuf_generate (
25
+ TARGET
26
+ wpimathproto
27
+ PROTOC_OUT_DIR
28
+ "${CMAKE_CURRENT_BINARY_DIR} /protobuf"
29
+ APPEND_PATH
30
+ )
31
+ endif ()
21
32
22
33
target_compile_features (wpimathproto PUBLIC cxx_std_14 )
23
34
You can’t perform that action at this time.
0 commit comments