From f4a3de575c84de5a1412b725f8a912b3accb5067 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Tue, 19 Sep 2023 11:19:56 -0400 Subject: [PATCH] cmake: Update library and target names for qrcodegen qrcodegen is identified as such (without the "lib" prefix) and as the target "qrcodegencpp::qrcodegencpp" by the CMake package generated by obs-deps and the finders in obs-studio when using module fallback. --- cmake/legacy.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index e7378c6c..620a6fdf 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -18,7 +18,9 @@ find_qt(COMPONENTS Core Widgets Svg Network) find_package(nlohmann_json 3 REQUIRED) # Find qrcodegencpp -find_package(Libqrcodegencpp REQUIRED) +set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON) +find_package(qrcodegencpp REQUIRED) +set(CMAKE_FIND_PACKAGE_PREFER_CONFIG OFF) # Find WebSocket++ find_package(Websocketpp 0.8 REQUIRED) @@ -138,7 +140,7 @@ target_link_libraries( nlohmann_json::nlohmann_json Websocketpp::Websocketpp Asio::Asio - Libqrcodegencpp::Libqrcodegencpp) + qrcodegencpp::qrcodegencpp) target_compile_features(obs-websocket PRIVATE cxx_std_17)