UI: Find Qt WinExtras only in Qt 5
WinExtras does not exist in Qt 6. Only try to find it and link against it if using Qt 5.
This commit is contained in:
parent
f516b4c9d9
commit
069f35a75c
@ -72,10 +72,15 @@ find_package(CURL REQUIRED)
|
||||
add_subdirectory(frontend-plugins)
|
||||
add_executable(obs)
|
||||
|
||||
set(UI_COMPONENTS_WIN "")
|
||||
if(QT_VERSION EQUAL 5)
|
||||
set(UI_COMPONENTS_WIN "WinExtras")
|
||||
endif()
|
||||
|
||||
find_qt(
|
||||
VERSION ${QT_VERSION}
|
||||
COMPONENTS Widgets Network Svg Xml
|
||||
COMPONENTS_WIN WinExtras
|
||||
COMPONENTS_WIN ${UI_COMPONENTS_WIN}
|
||||
COMPONENTS_LINUX Gui)
|
||||
|
||||
target_link_libraries(obs PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network)
|
||||
@ -338,7 +343,11 @@ if(OS_WINDOWS)
|
||||
win-update/win-update-helpers.hpp
|
||||
${CMAKE_BINARY_DIR}/obs.rc)
|
||||
|
||||
target_link_libraries(obs PRIVATE crypt32 OBS::blake2 Qt::WinExtras)
|
||||
if(QT_VERSION EQUAL 5)
|
||||
target_link_libraries(obs PRIVATE crypt32 OBS::blake2 Qt::WinExtras)
|
||||
else()
|
||||
target_link_libraries(obs PRIVATE crypt32 OBS::blake2)
|
||||
endif()
|
||||
|
||||
target_compile_features(obs PRIVATE cxx_std_17)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user