mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
fix: linux build error
This commit is contained in:
parent
a5fe25767a
commit
1cc2c7d2c8
2 changed files with 12 additions and 9 deletions
|
@ -280,6 +280,18 @@ endif()
|
|||
# Linux
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(QSC_DEPLOY_PATH "")
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
# qx11
|
||||
Qt${QT_VERSION_MAJOR}::X11Extras
|
||||
# xcb https://doc.qt.io/qt-5/linux-requirements.html
|
||||
xcb
|
||||
# pthread
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
# linux set app icon: https://blog.csdn.net/MrNoboday/article/details/82870853
|
||||
endif()
|
||||
|
||||
|
|
|
@ -199,9 +199,6 @@ endif()
|
|||
|
||||
# Linux
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# include
|
||||
target_include_directories(${QSC_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/ffmpeg/include)
|
||||
# link
|
||||
|
@ -213,12 +210,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|||
avcodec
|
||||
avutil
|
||||
swscale
|
||||
# qx11
|
||||
Qt${QT_VERSION_MAJOR}::X11Extras
|
||||
# xcb https://doc.qt.io/qt-5/linux-requirements.html
|
||||
xcb
|
||||
# pthread
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue