加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
Dan Dennedy 提交于 2023-11-28 21:49 . require MLT version 7.22.0
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.22.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}
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化