Skip to content

Commit 870a526

Browse files
author
孙羽
committed
Update FFmpeg and Qt versions
Upgrade FFmpeg to version 8.0 and update the required DLLs, while also transitioning to Qt 6 as the supported version for the project. Remove the option to build with Qt 5 and update the CMake configuration accordingly.
1 parent f11dd15 commit 870a526

File tree

4 files changed

+18
-45
lines changed

4 files changed

+18
-45
lines changed

CMakeLists.txt

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
2020

2121
project(olive-editor VERSION 0.2.0 LANGUAGES CXX)
22-
option(BUILD_QT6 "Build with Qt 6 over 5 (experimental)" ON)
2322
option(BUILD_DOXYGEN "Build Doxygen documentation" OFF)
2423
option(BUILD_TESTS "Build unit tests" OFF)
2524
option(USE_WERROR "Error on compile warning" OFF)
@@ -210,7 +209,7 @@ list(APPEND OLIVE_LIBRARIES olivecore)
210209
list(APPEND OLIVE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/ext/core/include)
211210

212211

213-
# Link Qt
212+
# Link Qt 6 (Qt 5 is no longer supported)
214213
set(QT_LIBRARIES
215214
Core
216215
Gui
@@ -222,53 +221,27 @@ set(QT_LIBRARIES
222221
if (UNIX AND NOT APPLE)
223222
list(APPEND QT_LIBRARIES DBus)
224223
endif()
225-
if (BUILD_QT6)
226-
set(QT_NAME Qt6)
227-
else()
228-
set(QT_NAME Qt5)
229-
endif()
230-
find_package(QT
231-
NAMES
232-
${QT_NAME}
233-
REQUIRED
234-
COMPONENTS
235-
${QT_LIBRARIES}
236-
OPTIONAL_COMPONENTS
237-
Network
238-
)
239-
find_package(Qt${QT_VERSION_MAJOR} REQUIRED
224+
find_package(Qt6 REQUIRED
240225
COMPONENTS
241226
${QT_LIBRARIES}
227+
OpenGLWidgets
242228
OPTIONAL_COMPONENTS
243229
Network
244230
)
245-
if (NOT Qt${QT_VERSION_MAJOR}Network_FOUND)
246-
message(" Qt${QT_VERSION_MAJOR}::Network module not found, crash reporting will be disabled.")
231+
if (NOT Qt6Network_FOUND)
232+
message(" Qt6::Network module not found, crash reporting will be disabled.")
247233
endif()
248234
list(APPEND OLIVE_LIBRARIES
249-
Qt${QT_VERSION_MAJOR}::Core
250-
Qt${QT_VERSION_MAJOR}::Gui
251-
Qt${QT_VERSION_MAJOR}::Widgets
252-
Qt${QT_VERSION_MAJOR}::OpenGL
253-
Qt${QT_VERSION_MAJOR}::Concurrent
235+
Qt6::Core
236+
Qt6::Gui
237+
Qt6::Widgets
238+
Qt6::OpenGL
239+
Qt6::OpenGLWidgets
240+
Qt6::Concurrent
254241
)
255242

256-
if (${QT_VERSION_MAJOR} EQUAL "6")
257-
find_package(Qt${QT_VERSION_MAJOR}
258-
REQUIRED
259-
OpenGLWidgets
260-
)
261-
262-
list(APPEND OLIVE_LIBRARIES
263-
Qt${QT_VERSION_MAJOR}::OpenGLWidgets
264-
)
265-
266-
# Link KDDockWidgets
267-
#find_package(KDDockWidgets-qt6 CONFIG REQUIRED)
268-
else()
269-
# Link KDDockWidgets
270-
#find_package(KDDockWidgets CONFIG REQUIRED)
271-
endif()
243+
# Link KDDockWidgets
244+
#find_package(KDDockWidgets-qt6 CONFIG REQUIRED)
272245

273246
list(APPEND OLIVE_LIBRARIES
274247
KDAB::kddockwidgets
@@ -278,7 +251,7 @@ list(APPEND OLIVE_LIBRARIES
278251
list(APPEND OLIVE_LIBRARIES OfxHost)
279252

280253
# Link FFmpeg
281-
find_package(FFMPEG REQUIRED
254+
find_package(FFMPEG 8.0 REQUIRED
282255
COMPONENTS
283256
avutil
284257
avcodec
@@ -350,7 +323,7 @@ if (WIN32)
350323
elseif (APPLE)
351324
list(APPEND OLIVE_LIBRARIES "-framework IOKit")
352325
elseif(UNIX)
353-
list(APPEND OLIVE_LIBRARIES Qt${QT_VERSION_MAJOR}::DBus)
326+
list(APPEND OLIVE_LIBRARIES Qt6::DBus)
354327
endif()
355328

356329
# Generate Git hash

app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if (WIN32)
204204
# DLLs to copy from MSYS2 (common dependencies)
205205
set(_msys2_dlls
206206
# FFmpeg
207-
avcodec-61.dll avformat-61.dll avutil-59.dll avfilter-10.dll
207+
avcodec-63.dll avformat-63.dll avutil-59.dll avfilter-12.dll
208208
swscale-8.dll swresample-5.dll
209209
# OpenImageIO
210210
OpenImageIO.dll OpenImageIO_Util.dll

ext/core

Submodule core updated from 1be2a3e to 6ba0a11

tests/gtest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ if (WIN32)
127127
# DLLs to copy from MSYS2
128128
set(_msys2_dlls
129129
# FFmpeg
130-
avcodec-61.dll avformat-61.dll avutil-59.dll avfilter-10.dll
130+
avcodec-63.dll avformat-63.dll avutil-59.dll avfilter-12.dll
131131
swscale-8.dll swresample-5.dll
132132
# OpenImageIO
133133
OpenImageIO.dll OpenImageIO_Util.dll

0 commit comments

Comments
 (0)