vcpkg: support building on Linux

This commit is contained in:
Nadia Holmquist Pedersen
2024-09-06 22:50:12 +02:00
parent d18524d5ac
commit 268c4f14c1
3 changed files with 45 additions and 2 deletions

View File

@ -160,7 +160,12 @@ if (BUILD_STATIC)
if (WIN32 AND USE_QT6)
qt_import_plugins(melonDS INCLUDE Qt::QModernWindowsStylePlugin)
endif()
target_link_options(melonDS PRIVATE -static)
if (USE_VCPKG AND UNIX AND NOT APPLE)
pkg_check_modules(ALSA REQUIRED IMPORTED_TARGET alsa)
target_link_libraries(melonDS PRIVATE PkgConfig::ALSA)
else()
target_link_options(melonDS PRIVATE -static)
endif()
endif()
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")