Use `find_package(Protobuf CONFIG)` for macOS too

This commit is contained in:
Jonas Kvinge 2023-07-11 13:42:15 +02:00
parent 0c1f4750ea
commit 7616c06ff9
3 changed files with 3 additions and 5 deletions

View File

@ -876,7 +876,7 @@ jobs:
GIO_EXTRA_MODULES: /usr/local/lib/gio/modules
GST_PLUGIN_SCANNER: /usr/local/opt/gstreamer/libexec/gstreamer-1.0/gst-plugin-scanner
GST_PLUGIN_PATH: /usr/local/lib/gstreamer-1.0
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake -DICU_ROOT=/usr/local/opt/icu4c -DENABLE_DBUS=OFF
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_QT6=ON -DBUILD_WERROR=OFF -DUSE_BUNDLE=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/lib/cmake -DICU_ROOT=/usr/local/opt/icu4c -DENABLE_DBUS=OFF -DPROTOBUF_INCLUDE_DIRS=/usr/local/include
- name: Build
run: cmake --build build --config Release --parallel 4

View File

@ -117,9 +117,7 @@ else()
find_package(Iconv)
endif()
find_package(GnuTLS REQUIRED)
if(NOT APPLE)
find_package(Protobuf CONFIG)
endif()
find_package(Protobuf CONFIG)
if(NOT Protobuf_FOUND)
find_package(Protobuf REQUIRED)
endif()

View File

@ -6,7 +6,7 @@ if(NOT protobuf_PROTOC_EXE)
endif()
if(NOT Protobuf_LIBRARIES)
set(Protobuf_LIBRARIES protobuf::libprotobuf protobuf::libprotoc)
set(Protobuf_LIBRARIES protobuf::libprotobuf)
endif()
set(SOURCES tagreaderbase.cpp tagreadermessages.proto)