build(cmake): fallback to pkg-config discovery for tomlplusplus

Some distributions of it (like in vcpkg *wink*) won't contain CMake files

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth 2025-05-05 11:54:20 -04:00 committed by Seth Flynn
parent 822b10e46e
commit a5f5d14538
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
2 changed files with 13 additions and 1 deletions

View file

@ -1309,12 +1309,16 @@ target_link_libraries(Launcher_logic
Launcher_murmur2
nbt++
${ZLIB_LIBRARIES}
tomlplusplus::tomlplusplus
qdcss
BuildConfig
Qt${QT_VERSION_MAJOR}::Widgets
qrcodegenerator
)
if(TARGET PkgConfig::tomlplusplus)
target_link_libraries(Launcher_logic PkgConfig::tomlplusplus)
else()
target_link_libraries(Launcher_logic tomlplusplus::tomlplusplus)
endif()
if (UNIX AND NOT CYGWIN AND NOT APPLE)
target_link_libraries(Launcher_logic