Skip to content

Commit

Permalink
Try using EXPORT_MACRO
Browse files Browse the repository at this point in the history
  • Loading branch information
KangarooKoala committed Dec 28, 2023
1 parent 6069560 commit 71f9a00
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions wpimath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@ file(GLOB wpimath_proto_src src/main/proto/*.proto)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
add_library(wpimathproto ${wpimath_proto_src})

protobuf_generate(
TARGET
wpimathproto
# EXPORT_MACRO?
PROTOC_OUT_DIR
"${CMAKE_CURRENT_BINARY_DIR}/protobuf"
APPEND_PATH
)
if(MSVC)
protobuf_generate(
TARGET
wpimathproto
EXPORT_MACRO
"__declspec(dllexport)"
PROTOC_OUT_DIR
"${CMAKE_CURRENT_BINARY_DIR}/protobuf"
APPEND_PATH
)
else()
protobuf_generate(
TARGET
wpimathproto
PROTOC_OUT_DIR
"${CMAKE_CURRENT_BINARY_DIR}/protobuf"
APPEND_PATH
)
endif()

target_compile_features(wpimathproto PUBLIC cxx_std_14)

Expand Down

0 comments on commit 71f9a00

Please sign in to comment.