mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01: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)
|
if(WIN32)
|
||||||
set(VCPKG_TARGET_TRIPLET "x64-windows")
|
set(VCPKG_TARGET_TRIPLET "x64-windows")
|
||||||
@ -38,3 +38,4 @@ add_subdirectory(Common/stomt-qml)
|
|||||||
add_subdirectory(Common/qt-breakpad)
|
add_subdirectory(Common/qt-breakpad)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.17)
|
cmake_minimum_required(VERSION 3.16.0)
|
||||||
|
|
||||||
project(ScreenPlay)
|
project(ScreenPlay)
|
||||||
|
|
||||||
@ -64,8 +64,8 @@ add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
|
|||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
|
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
|
||||||
|
|
||||||
target_link_libraries(ScreenPlay PRIVATE
|
target_link_libraries(${PROJECT_NAME}
|
||||||
Qt5::Qml
|
PRIVATE
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
Qt5::Gui
|
Qt5::Gui
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
|
@ -3,22 +3,24 @@ project(ScreenPlaySDK)
|
|||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
|
||||||
find_package(
|
find_package(
|
||||||
Qt5
|
Qt5
|
||||||
COMPONENTS Quick
|
COMPONENTS Quick
|
||||||
QML
|
|
||||||
Widgets
|
|
||||||
Gui
|
|
||||||
Network
|
Network
|
||||||
Core
|
Core
|
||||||
REQUIRED)
|
REQUIRED)
|
||||||
|
|
||||||
set(src screenplay-sdk_plugin.cpp
|
set(src screenplay-sdk_plugin.cpp
|
||||||
screenplaysdk.cpp)
|
screenplaysdk.cpp)
|
||||||
|
|
||||||
set(headers screenplay-sdk_plugin.h
|
set(headers screenplay-sdk_plugin.h
|
||||||
screenplaysdk.h)
|
screenplaysdk.h)
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} ${src} ${headers})
|
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(
|
find_package(
|
||||||
Qt5
|
Qt5
|
||||||
COMPONENTS Quick
|
COMPONENTS Quick
|
||||||
QML
|
|
||||||
Core
|
Core
|
||||||
REQUIRED)
|
REQUIRED)
|
||||||
|
|
||||||
@ -24,8 +23,11 @@ set(headers screenplaysysinfo_plugin.h
|
|||||||
storage.h)
|
storage.h)
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} ${src} ${headers})
|
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
|
# QML module deployment
|
||||||
|
@ -7,7 +7,6 @@ set(CMAKE_AUTOMOC ON)
|
|||||||
find_package(
|
find_package(
|
||||||
Qt5
|
Qt5
|
||||||
COMPONENTS Quick
|
COMPONENTS Quick
|
||||||
QML
|
|
||||||
Widgets
|
Widgets
|
||||||
Gui
|
Gui
|
||||||
WebEngine
|
WebEngine
|
||||||
@ -48,7 +47,6 @@ add_executable(${PROJECT_NAME} ${src} ${headers} ${src_plattform} ${headers_pla
|
|||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Qt5::Qml
|
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
Qt5::Gui
|
Qt5::Gui
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
|
@ -1,22 +1,29 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.0)
|
|
||||||
project(ScreenPlayWidget)
|
project(ScreenPlayWidget)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
find_package(Qt5Qml)
|
|
||||||
find_package(Qt5Quick)
|
find_package(
|
||||||
find_package(Qt5Gui)
|
Qt5
|
||||||
find_package(Qt5Widgets)
|
COMPONENTS Quick
|
||||||
find_package(Qt5Core)
|
Widgets
|
||||||
|
Gui
|
||||||
|
WebEngine
|
||||||
|
REQUIRED)
|
||||||
|
|
||||||
set(src main.cpp
|
set(src main.cpp
|
||||||
src/widgetwindow.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})
|
add_executable(ScreenPlayWidget ${src} ${headers} ${resources})
|
||||||
|
|
||||||
target_link_libraries( ScreenPlayWidget
|
target_link_libraries( ScreenPlayWidget
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Qt5::Qml
|
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
Qt5::Gui
|
Qt5::Gui
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
|
Loading…
Reference in New Issue
Block a user