From 25165146e00a3734e4693855b22c07140fd70105 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 27 Nov 2020 15:00:41 +0100 Subject: CMake: Fix usage of static protobuf libraries on Windows --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 454bc40a62..7cc3a7895a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1640,11 +1640,12 @@ target_include_directories(mixxx-lib SYSTEM PUBLIC ${PortMidi_INCLUDE_DIRS}) target_link_libraries(mixxx-lib PUBLIC ${PortMidi_LIBRARIES}) # Protobuf +if(STATIC_DEPS) + set(Protobuf_USE_STATIC_LIBS ON) + mark_as_advanced(Protobuf_USE_STATIC_LIBS) +endif() add_subdirectory(src/proto) target_link_libraries(mixxx-lib PUBLIC mixxx-proto) -if(WIN32 AND NOT STATIC_DEPS) - target_compile_definitions(mixxx-lib PUBLIC PROTOBUF_USE_DLLS) -endif() # Rigtorp SPSC Queue # https://github.com/rigtorp/SPSCQueue -- cgit v1.2.3