mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-02 08:39:49 +02:00
Fix cmake be compilable on linux
Downgrade to 3.16 that ships with Ubuntu 20.04 Fix QML modules that does not exists ( cmake on Windows just ignores this lol)
This commit is contained in:
parent
52fb670d55
commit
9ce9467dd7
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.17.0 )
|
||||
cmake_minimum_required(VERSION 3.16.0 )
|
||||
|
||||
if(WIN32)
|
||||
set(VCPKG_TARGET_TRIPLET "x64-windows")
|
||||
@ -38,3 +38,4 @@ add_subdirectory(Common/stomt-qml)
|
||||
add_subdirectory(Common/qt-breakpad)
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
|
||||
project(ScreenPlay)
|
||||
|
||||
@ -64,8 +64,8 @@ add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
|
||||
|
||||
target_link_libraries(ScreenPlay PRIVATE
|
||||
Qt5::Qml
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Quick
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
|
@ -3,22 +3,24 @@ project(ScreenPlaySDK)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS Quick
|
||||
QML
|
||||
Widgets
|
||||
Gui
|
||||
Network
|
||||
Core
|
||||
REQUIRED)
|
||||
|
||||
set(src screenplay-sdk_plugin.cpp
|
||||
screenplaysdk.cpp)
|
||||
|
||||
set(headers screenplay-sdk_plugin.h
|
||||
screenplaysdk.h)
|
||||
|
||||
add_library(${PROJECT_NAME} ${src} ${headers})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick Qt5::Gui Qt5::Qml Qt5::Network)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Core
|
||||
Qt5::Quick
|
||||
Qt5::Gui
|
||||
Qt5::Network)
|
||||
|
@ -6,7 +6,6 @@ set(CMAKE_AUTOMOC ON)
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS Quick
|
||||
QML
|
||||
Core
|
||||
REQUIRED)
|
||||
|
||||
@ -24,8 +23,11 @@ set(headers screenplaysysinfo_plugin.h
|
||||
storage.h)
|
||||
|
||||
add_library(${PROJECT_NAME} ${src} ${headers})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick Qt5::Qml)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Core
|
||||
Qt5::Quick)
|
||||
|
||||
|
||||
# QML module deployment
|
||||
|
@ -7,7 +7,6 @@ set(CMAKE_AUTOMOC ON)
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS Quick
|
||||
QML
|
||||
Widgets
|
||||
Gui
|
||||
WebEngine
|
||||
@ -48,7 +47,6 @@ add_executable(${PROJECT_NAME} ${src} ${headers} ${src_plattform} ${headers_pla
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Qml
|
||||
Qt5::Quick
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
|
@ -1,22 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
project(ScreenPlayWidget)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
find_package(Qt5Qml)
|
||||
find_package(Qt5Quick)
|
||||
find_package(Qt5Gui)
|
||||
find_package(Qt5Widgets)
|
||||
find_package(Qt5Core)
|
||||
|
||||
find_package(
|
||||
Qt5
|
||||
COMPONENTS Quick
|
||||
Widgets
|
||||
Gui
|
||||
WebEngine
|
||||
REQUIRED)
|
||||
|
||||
set(src main.cpp
|
||||
src/widgetwindow.cpp)
|
||||
set(headers src/widgetwindow.h)
|
||||
set(resources SPWidgetResources.qrc)
|
||||
|
||||
set(headers
|
||||
src/widgetwindow.h)
|
||||
|
||||
set(resources
|
||||
SPWidgetResources.qrc)
|
||||
|
||||
add_executable(ScreenPlayWidget ${src} ${headers} ${resources})
|
||||
|
||||
target_link_libraries( ScreenPlayWidget
|
||||
PRIVATE
|
||||
Qt5::Qml
|
||||
Qt5::Quick
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
|
Loading…
Reference in New Issue
Block a user