cmake: included option for qt 6 compilation
Also fixed minor Qt 6 issue
This commit is contained in:
+9
-4
@@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
project(olive-editor VERSION 0.2.0 LANGUAGES CXX)
|
||||
|
||||
option(BUILD_QT6 "Build with Qt 6 over 5 (experimental)" OFF)
|
||||
option(BUILD_DOXYGEN "Build Doxygen documentation" OFF)
|
||||
option(BUILD_TESTS "Build unit tests" OFF)
|
||||
option(USE_WERROR "Error on compile warning" OFF)
|
||||
@@ -110,10 +111,14 @@ set(QT_LIBRARIES
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT_LIBRARIES DBus)
|
||||
endif()
|
||||
if (BUILD_QT6)
|
||||
set(QT_NAME Qt6)
|
||||
else()
|
||||
set(QT_NAME Qt5)
|
||||
endif()
|
||||
find_package(QT
|
||||
NAMES
|
||||
Qt6
|
||||
Qt5
|
||||
${QT_NAME}
|
||||
REQUIRED
|
||||
COMPONENTS
|
||||
${QT_LIBRARIES}
|
||||
@@ -251,6 +256,6 @@ add_subdirectory(ext)
|
||||
add_subdirectory(app)
|
||||
|
||||
if (BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
@@ -39,7 +39,7 @@ AV1Section::AV1Section(int default_crf, QWidget *parent) :
|
||||
CodecSection(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
layout->addWidget(new QLabel(tr("Preset:")), row, 0);
|
||||
@@ -104,7 +104,7 @@ AV1CRFSection::AV1CRFSection(int default_crf, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
crf_slider_ = new QSlider(Qt::Horizontal);
|
||||
crf_slider_->setMinimum(kMinimumCRF);
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
add_subdirectory(core)
|
||||
|
||||
set(KDDockWidgets_STATIC ON CACHE INTERNAL "Force KDDockWidgets to build statically")
|
||||
set(KDDockWidgets_QT6 ${BUILD_QT6} CACHE INTERNAL "Conform KDDockWidgets' Qt 6 setting to ours")
|
||||
add_subdirectory(KDDockWidgets)
|
||||
|
||||
Reference in New Issue
Block a user