forked from mltframework/shotcut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
74 lines (61 loc) · 1.8 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.13)
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20")
cmake_policy(SET CMP0115 NEW)
endif()
if(NOT DEFINED SHOTCUT_VERSION)
string(TIMESTAMP SHOTCUT_VERSION "%y.%m.%d")
endif()
project(shotcut
VERSION ${SHOTCUT_VERSION}
DESCRIPTION "cross-platform (Qt), open-source (GPLv3) video editor"
HOMEPAGE_URL "https://www.shotcut.org"
LANGUAGES CXX
)
if(WIN32)
option(WINDOWS_DEPLOY "Install exes/libs directly to prefix (no subdir /bin)" ON)
endif()
include(FeatureSummary)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt6 6.4 REQUIRED
COMPONENTS
Charts
Multimedia
Network
OpenGL
OpenGLWidgets
QuickControls2
QuickWidgets
Sql
Widgets
Xml
)
find_package(PkgConfig REQUIRED)
pkg_check_modules(mlt++ REQUIRED IMPORTED_TARGET mlt++-7>=7.18.0)
pkg_check_modules(FFTW IMPORTED_TARGET fftw3)
if(NOT FFTW_FOUND)
pkg_check_modules(FFTW REQUIRED IMPORTED_TARGET fftw)
endif()
add_subdirectory(CuteLogger)
add_subdirectory(src)
add_subdirectory(translations)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
add_custom_target(codespell COMMAND
cd "${CMAKE_SOURCE_DIR}" &&
codespell -w -q 3
-L shotcut,uint,seeked,really,prevent
-S export-chapters.js,export-edl.js,CuteLogger,drmingw,node_modules,moc_*,index.theme,*.ts,three.min.js,three.js,jquery.js,rangy-*.js,Makefile,shotcut.pro,*.desktop
)
add_custom_target(astyle COMMAND
cd "${CMAKE_SOURCE_DIR}" &&
astyle --project=.astylerc --ignore-exclude-errors --recursive "./*.cpp,*.h"
)
file(GLOB_RECURSE QML_SRC "src/qml/*.qml")
add_custom_target(qmlformat COMMAND
${CMAKE_PREFIX_PATH}/bin/qmlformat -i ${QML_SRC}
)