mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 06:08:39 +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
|
# Linux
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
set(QSC_DEPLOY_PATH "")
|
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
|
# linux set app icon: https://blog.csdn.net/MrNoboday/article/details/82870853
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,6 @@ endif()
|
||||||
|
|
||||||
# Linux
|
# Linux
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
|
|
||||||
# include
|
# include
|
||||||
target_include_directories(${QSC_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/ffmpeg/include)
|
target_include_directories(${QSC_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/ffmpeg/include)
|
||||||
# link
|
# link
|
||||||
|
@ -213,12 +210,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
avcodec
|
avcodec
|
||||||
avutil
|
avutil
|
||||||
swscale
|
swscale
|
||||||
# qx11
|
|
||||||
Qt${QT_VERSION_MAJOR}::X11Extras
|
|
||||||
# xcb https://doc.qt.io/qt-5/linux-requirements.html
|
|
||||||
xcb
|
|
||||||
# pthread
|
|
||||||
Threads::Threads
|
|
||||||
)
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue