Commit 7b2134e3 authored by Vincent Pinon's avatar Vincent Pinon
Browse files

CMakeLists reorganization, fix RTTR on Windows

parent fe082069
......@@ -8,13 +8,8 @@ set (KDE_APPLICATIONS_VERSION_MAJOR "19")
set (KDE_APPLICATIONS_VERSION_MINOR "03")
set (KDE_APPLICATIONS_VERSION_MICRO "70")
option(BUILD_FUZZING "Build fuzzing target" OFF)
if (BUILD_FUZZING)
SET(CMAKE_CXX_COMPILER /usr/bin/clang++)
endif()
set(KDENLIVE_VERSION ${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO})
cmake_minimum_required(VERSION 3.0)
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
......@@ -22,17 +17,19 @@ endif()
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
endif()
if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()
# To be switched on when releasing.
option(RELEASE_BUILD "Remove Git revision from program version" ON)
option(BUILD_TESTING "Build tests" ON)
option(BUILD_FUZZING "Build fuzzing target" OFF)
# Minimum versions of main dependencies.
set(MLT_MIN_MAJOR_VERSION 6)
set(MLT_MIN_MINOR_VERSION 10)
set(MLT_MIN_MINOR_VERSION 12)
set(MLT_MIN_PATCH_VERSION 0)
set(MLT_MIN_VERSION ${MLT_MIN_MAJOR_VERSION}.${MLT_MIN_MINOR_VERSION}.${MLT_MIN_PATCH_VERSION})
set(QT_MIN_VERSION 5.7.0)
# KDE Frameworks
find_package(ECM 5.18.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)
include(KDECompilerSettings NO_POLICY_SCOPE)
......@@ -46,63 +43,37 @@ include(ECMMarkNonGuiExecutable)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
include(ECMEnableSanitizers)
SET(DEFAULT_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "")
include(rttr.CMakeLists.txt)
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DTRANSLATION_DOMAIN=\"kdenlive\")
find_package(KF5 REQUIRED COMPONENTS Archive Bookmarks CoreAddons Config ConfigWidgets
DBusAddons KIO WidgetsAddons NotifyConfig NewStuff XmlGui Notifications GuiAddons TextWidgets IconThemes Declarative Solid
OPTIONAL_COMPONENTS DocTools FileMetaData Crash Purpose)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
SET(DEFAULT_CXX_FLAGS "${DEFAULT_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-unknown-warning-option")
if (BUILD_FUZZING)
SET(CMAKE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -fsanitize=fuzzer-no-link,address")
endif()
# To be switched on when releasing.
option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" ON)
option(BUILD_TESTS "Build tests" ON)
# Qt
set(QT_MIN_VERSION 5.7.0)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets Svg Quick Concurrent QuickWidgets)
find_package(Qt5 OPTIONAL_COMPONENTS WebKitWidgets QUIET)
add_definitions(-DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING)
set(DEFAULT_CXX_FLAGS "${DEFAULT_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
# Get current version.
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION}")
if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Probably a Git workspace; determine the revision.
find_package(Git QUIET)
if(GIT_FOUND)
exec_program(${GIT_EXECUTABLE}
${CMAKE_SOURCE_DIR}
ARGS "log -n 1 --pretty=format:\"%h\""
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
RETURN_VALUE TAG_RESULT
)
# git log failed; maybe the repository was checked with depth=1.
if(NOT ${TAG_RESULT} EQUAL 0)
exec_program(${GIT_EXECUTABLE}
${CMAKE_SOURCE_DIR}
ARGS "describe --always"
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
)
endif()
message(STATUS "Kdenlive Git revision: ${KDENLIVE_GIT_REVISION}")
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})")
else()
message(STATUS "Kdenlive Git revision could not be determined")
endif()
endif()
# MLT
find_package(MLT ${MLT_MIN_VERSION} REQUIRED)
set_package_properties(MLT PROPERTIES DESCRIPTION "Multimedia framework"
URL "https://mltframework.org"
PURPOSE "Required to do video processing")
message(STATUS "Found MLT++: ${MLTPP_LIBRARIES}")
# Windows
include(CheckIncludeFiles)
check_include_files(malloc.h HAVE_MALLOC_H)
check_include_files(pthread.h HAVE_PTHREAD_H)
if(WIN32)
find_package(DrMinGW)
set(MLT_PREFIX "..")
else()
set(MLT_PREFIX ${MLT_ROOT_DIR})
endif()
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets Svg Quick Concurrent QuickWidgets)
find_package(Qt5 OPTIONAL_COMPONENTS WebKitWidgets QUIET)
# Optional deps status
find_package(KF5 5.23.0 OPTIONAL_COMPONENTS XmlGui QUIET)
if (KF5XmlGui_FOUND)
message(STATUS "Found KF5 >= 5.23.0 enabling icon coloring")
......@@ -111,14 +82,6 @@ else()
set(KF5_ICON_COMPATIBILITY TRUE)
endif()
find_package(KF5 REQUIRED COMPONENTS Archive Bookmarks CoreAddons Config ConfigWidgets
DBusAddons KIO WidgetsAddons NotifyConfig NewStuff XmlGui Notifications GuiAddons TextWidgets IconThemes
Declarative Solid
OPTIONAL_COMPONENTS DocTools FileMetaData Crash Purpose)
if(WIN32)
find_package(DrMinGW)
endif(WIN32)
if (KF5FileMetaData_FOUND)
message(STATUS "Found KF5 FileMetadata to extract file metadata")
set(KF5_FILEMETADATA TRUE)
......@@ -133,38 +96,56 @@ else()
message(STATUS "KF5 Purpose not found, filesharing disabled")
endif()
# Search MLT package.
find_package(MLT ${MLT_MIN_VERSION} REQUIRED)
set_package_properties(MLT PROPERTIES
DESCRIPTION "Multimedia framework and video playout server for TV broadcasting"
URL "http://mltframework.org"
TYPE RUNTIME
PURPOSE "Required to do video processing")
if(NOT WIN32)
set(MLT_PREFIX ${MLT_ROOT_DIR})
else()
set(MLT_PREFIX "..")
endif()
add_subdirectory(data)
if(KF5DocTools_FOUND)
add_subdirectory(doc)
kdoctools_install(po)
endif()
#add_subdirectory(plugins)
add_subdirectory(renderer)
# Get current version.
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION}")
if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Probably a Git workspace; determine the revision.
find_package(Git QUIET)
if(GIT_FOUND)
exec_program(${GIT_EXECUTABLE} ${CMAKE_SOURCE_DIR}
ARGS "log -n 1 --pretty=format:\"%h\""
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION)
message(STATUS "Kdenlive Git revision: ${KDENLIVE_GIT_REVISION}")
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})")
else()
message(STATUS "Kdenlive Git revision could not be determined")
endif()
endif()
# may need to build "rttr_project" first?
include(rttr.CMakeLists.txt)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(FFMPEG_SUFFIX "" CACHE STRING "FFmpeg custom suffix")
configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
# Sources
add_subdirectory(src)
add_subdirectory(renderer)
add_subdirectory(thumbnailer)
add_subdirectory(data)
ki18n_install(po)
include(GNUInstallDirs)
install(FILES AUTHORS COPYING README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES kdenlive.categories DESTINATION ${KDE_INSTALL_CONFDIR})
############################
# Tests
############################
if (BUILD_TESTS)
message(STATUS "Building TESTS")
if (BUILD_TESTING)
message(STATUS "Building tests")
add_subdirectory(tests)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -fexceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions")
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
......@@ -172,38 +153,17 @@ if (BUILD_TESTS)
${MLTPP_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/lib/external
${CMAKE_CURRENT_SOURCE_DIR}/lib
src
${CMAKE_BINARY_DIR}/rttr-install/include
)
ADD_EXECUTABLE(runTests ${Tests_SRCS})
src)
add_executable(runTests ${Tests_SRCS})
set_property(TARGET runTests PROPERTY CXX_STANDARD 14)
target_link_libraries(runTests kdenliveLib)
ADD_TEST(runTests runTests -d yes)
else()
message(STATUS "Not building TESTS")
add_test(runTests runTests -d yes)
endif()
############################
# Tests
############################
if (BUILD_FUZZING)
message(STATUS "Building FUZZING")
message(STATUS "Building fuzzing")
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
set(CMAKE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -fsanitize=fuzzer-no-link,address")
add_subdirectory(fuzzer)
else()
message(STATUS "Not building FUZZING")
endif()
#add_subdirectory(testingArea)
ki18n_install(po)
if (KF5DocTools_FOUND)
kdoctools_install(po)
endif()
install( FILES kdenlive.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
include(GNUInstallDirs)
install( FILES AUTHORS COPYING README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -248,7 +248,7 @@ cmake3 ../kdenlive \
-DPACKAGERS_BUILD=1 \
-DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON \
-DKDE_L10N_AUTO_TRANSLATIONS:BOOL=ON \
-DBUILD_TESTS=FALSE
-DBUILD_TESTING=FALSE
make -j8
make install
......
......@@ -41,7 +41,7 @@ cmake $KDENLIVE_SOURCES \
-DCMAKE_INSTALL_PREFIX:PATH=$BUILD_PREFIX/kdenlive.appdir/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_TESTING=FALSE \
-DBUILD_TESTS=FALSE
-DBUILD_TESTING=FALSE
# Build and Install Kdenlive (ready for the next phase)
make -j$CPU_COUNT install
......@@ -248,7 +248,7 @@ cmake3 ../kdenlive \
-DPACKAGERS_BUILD=1 \
-DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON \
-DKDE_L10N_AUTO_TRANSLATIONS:BOOL=ON \
-DBUILD_TESTS=FALSE
-DBUILD_TESTING=FALSE
make -j8
make install
......
......@@ -236,5 +236,5 @@ git_pull https://github.com/mltframework/mlt.git
configure_make mlt --enable-gpl --disable-rtaudio
#po->ruby
git_pull git://anongit.kde.org/kdenlive
cmake_make kdenlive -DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON -DPACKAGERS_BUILD=1 -DBUILD_TESTS=FALSE
cmake_make kdenlive -DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON -DPACKAGERS_BUILD=1 -DBUILD_TESTING=FALSE
#-DKDE_L10N_AUTO_TRANSLATIONS:BOOL=ON \
cmake_minimum_required(VERSION 3.5)
# simplify variable expansion
cmake_policy(SET CMP0053 NEW)
cmake_policy(SET CMP0010 NEW)
project(rttr-download NONE)
include(ExternalProject)
ExternalProject_Add(rttr_project
GIT_REPOSITORY https://github.com/rttrorg/rttr.git
GIT_TAG "v0.9.6"
SOURCE_DIR "${CMAKE_BINARY_DIR}/rttr-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/rttr-build"
INSTALL_DIR "${CMAKE_BINARY_DIR}/rttr-install"
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=../rttr-install/ -DBUILD_EXAMPLES=OFF -DBUILD_DOCUMENTATION=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_PACKAGE=OFF -DBUILD_STATIC=ONN "${CMAKE_BINARY_DIR}/rttr-src"
BUILD_COMMAND ${CMAKE_COMMAND} --build .
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
LOG_DOWNLOAD ON
URL https://github.com/rttrorg/rttr/archive/v0.9.6.tar.gz
UPDATE_COMMAND ""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DBUILD_EXAMPLES=OFF -DBUILD_DOCUMENTATION=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_PACKAGE=OFF -DBUILD_STATIC=ON
)
add_custom_target(rttr_final
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/rttr-install/lib*/*.a ${CMAKE_BINARY_DIR}/rttr-install
)
add_dependencies(rttr_final rttr_project)
ExternalProject_Get_Property(rttr_project install_dir)
add_library(rttr_core STATIC IMPORTED)
add_dependencies(rttr_core rttr_project)
file(MAKE_DIRECTORY "${install_dir}/include")
set_target_properties(rttr_core PROPERTIES
IMPORTED_LOCATION "${install_dir}/lib/librttr_core.a"
INTERFACE_INCLUDE_DIRECTORIES "${install_dir}/include")
add_definitions(${qt5gui_definitions})
SET(KDENLIVE_CXX_FLAGS "${DEFAULT_CXX_FLAGS} -Wall -pedantic -Wextra")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wcast-qual -Wcast-align -Wfloat-equal -Wpointer-arith")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wunreachable-code -Wchar-subscripts -Wcomment -Wformat")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Werror-implicit-function-declaration -Wmain -Wmissing-braces")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wparentheses -Wsequence-point -Wreturn-type -Wswitch")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wuninitialized -Wreorder -Wundef -Wshadow -Wwrite-strings")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wsign-compare -Wconversion")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wmissing-noreturn -Wsign-conversion -Wunused ")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wstrict-aliasing -Wconversion")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wdisabled-optimization")
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wno-undef")
if (KDENLIVE_COMPILER_IS_GNUCXX)
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wlogical-op -Wunsafe-loop-optimizations ")
endif()
SET(KDENLIVE_CXX_FLAGS "${KDENLIVE_CXX_FLAGS} -Wunused-parameter -Wshadow -Wno-variadic-macros -Wno-float-conversion")
if(NOT WIN32)
find_package(PkgConfig QUIET)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=mltdatadir mlt-framework
OUTPUT_VARIABLE MLT_DATADIR
RESULT_VARIABLE MLT_DATADIR_failed)
if (NOT MLT_DATADIR_failed)
string(REGEX REPLACE "[\r\n]" "" MLT_DATADIR "${MLT_DATADIR}")
endif()
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=meltbin mlt-framework
OUTPUT_VARIABLE MLT_MELTBIN
RESULT_VARIABLE MLT_MELTBIN_failed)
if (NOT MLT_MELTBIN_failed)
string(REGEX REPLACE "[\r\n]" "" MLT_MELTBIN "${MLT_MELTBIN}")
endif()
else()
set(MLT_MELTBIN "melt.exe")
set(MLT_DATADIR "../share/mlt")
endif()
configure_file( mlt_config.h.in ${CMAKE_BINARY_DIR}/generated/mlt_config.h )
include_directories( ${CMAKE_BINARY_DIR}/generated/ ) # Make sure it can be included...
include_directories( ${CMAKE_BINARY_DIR}/rttr-install/include )
option(WITH_JogShuttle "Build Jog/Shuttle support" ON)
set(FFMPEG_SUFFIX "" CACHE STRING "FFmpeg custom suffix")
find_package(LibV4L2)
set_package_properties(LibV4L2 PROPERTIES
DESCRIPTION "Collection of video4linux support libraries"
URL "http://freecode.com/projects/libv4l"
TYPE RUNTIME
PURPOSE "Required for better webcam support")
if(WITH_JogShuttle)
check_include_files(linux/input.h HAVE_LINUX_INPUT_H)
if(HAVE_LINUX_INPUT_H)
set(BUILD_JogShuttle TRUE)
endif(HAVE_LINUX_INPUT_H)
endif()
set_package_properties(OpenGL PROPERTIES
DESCRIPTION "the OpenGL library"
URL ""
TYPE RUNTIME
PURPOSE "")
#if(APPLE)
# macro_log_feature(SDL_FOUND
# "SDL"
# "Cross-platform multimedia library"
# "http://www.libsdl.org"
# TRUE
# )
#endif(APPLE)
# use sane compile flags
add_definitions(
# -DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_TO_ASCII
# -DQT_NO_CAST_FROM_ASCII
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
# -DQT_USE_FAST_OPERATOR_PLUS
)
install(FILES kdenlivesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
kconfig_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc)
### Find source files
add_subdirectory(abstractmodel)
add_subdirectory(assets)
add_subdirectory(bin)
......@@ -113,149 +24,80 @@ add_subdirectory(transitions)
add_subdirectory(utils)
add_subdirectory(widgets)
add_subdirectory(xml)
if (Qt5WebKitWidgets_FOUND)
if(Qt5WebKitWidgets_FOUND)
add_subdirectory(qt-oauth-lib)
endif()
FILE(GLOB top_SRCS "*.cpp")
string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/lib/[^;]+;?" "" top_SRCS "${top_SRCS}")
LIST(REMOVE_ITEM top_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
list(APPEND kdenlive_SRCS ${top_SRCS})
ecm_qt_declare_logging_category(kdenlive_SRCS HEADER kdenlive_debug.h IDENTIFIER KDENLIVE_LOG CATEGORY_NAME org.kde.multimedia.kdenlive)
ki18n_wrap_ui(kdenlive_UIS
ui/addtrack_ui.ui
ui/archivewidget_ui.ui
ui/audiospectrum_ui.ui
ui/backupdialog_ui.ui
ui/bezierspline_ui.ui
ui/boolparamwidget_ui.ui
ui/clipdurationdialog_ui.ui
ui/clipproperties_ui.ui
ui/clipspeed_ui.ui
ui/clipstabilize_ui.ui
ui/cliptranscode_ui.ui
ui/collapsiblewidget_ui.ui
ui/colorclip_ui.ui
ui/colorplaneexport_ui.ui
ui/configcapture_ui.ui
ui/configenv_ui.ui
ui/configjogshuttle_ui.ui
ui/configmisc_ui.ui
ui/configproject_ui.ui
ui/configproxy_ui.ui
ui/configsdl_ui.ui
ui/configtimeline_ui.ui
ui/configtranscode_ui.ui
ui/cutjobdialog_ui.ui
ui/dvdwizardchapters_ui.ui
ui/dvdwizardmenu_ui.ui
ui/dvdwizardstatus_ui.ui
ui/dvdwizardvob_ui.ui
ui/effectlist_ui.ui
ui/fontval_ui.ui
ui/freesound_ui.ui
ui/geometrywidget_ui.ui
ui/gradientedit_ui.ui
ui/histogram_ui.ui
ui/keyframedialog_ui.ui
ui/keyframeeditor_ui.ui
ui/keyframewidget_ui.ui
ui/keywordval_ui.ui
ui/listparamwidget_ui.ui
ui/logindialog_ui.ui
ui/managecaptures_ui.ui
ui/manageencodingprofile_ui.ui
ui/markerdialog_ui.ui
ui/missingclips_ui.ui
ui/monitoreditwidget_ui.ui
ui/profiledialog_ui.ui
ui/projectsettings_ui.ui
ui/qtextclip_ui.ui
ui/recmonitor_ui.ui
ui/renderwidget_ui.ui
ui/rgbparade_ui.ui
ui/saveprofile_ui.ui
ui/scenecutdialog_ui.ui
ui/selectivecolor_ui.ui
ui/slideshowclip_ui.ui
ui/smconfig_ui.ui
ui/spacerdialog_ui.ui
ui/spectrogram_ui.ui
ui/templateclip_ui.ui
ui/titlewidget_ui.ui
ui/tracksconfigdialog_ui.ui
ui/transitionsettings_ui.ui
ui/unicodewidget_ui.ui
ui/urlval_ui.ui
ui/vectorscope_ui.ui
ui/waveform_ui.ui
ui/wipeval_ui.ui
ui/wizardcapture_ui.ui
ui/wizardcheck_ui.ui
ui/wizardextra_ui.ui
ui/wizardmltcheck_ui.ui
ui/wizardstandard_ui.ui
)
if(BUILD_JogShuttle)
check_include_files(linux/input.h HAVE_LINUX_INPUT_H)
if(HAVE_LINUX_INPUT_H)
list(APPEND kdenlive_SRCS
jogshuttle/jogmanager.cpp
jogshuttle/jogaction.cpp
jogshuttle/jogshuttle.cpp
jogshuttle/jogshuttleconfig.cpp
)
jogshuttle/jogshuttleconfig.cpp)
endif()
# Sets the icon on Windows and OSX
## top_SRCS
file(GLOB top_SRCS "*.cpp")
# string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/lib/[^;]+;?" "" top_SRCS "${top_SRCS}")
list(REMOVE_ITEM top_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
list(APPEND kdenlive_SRCS ${top_SRCS})
## Icon for Windows and OSX
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../data/icons/*-apps-kdenlive.png")
ecm_add_app_icon(kdenlive_SRCS ICONS ${ICONS_SRCS})
qt5_add_dbus_adaptor(kdenlive_SRCS
org.kdenlive.MainWindow.xml
mainwindow.h
MainWindow
)
qt5_add_resources(kdenlive_extra_SRCS icons.qrc ui/resources.qrc uiresources.qrc)
## Others special cases
kconfig_add_kcfg_files(kdenlive_SRCS kdenlivesettings.kcfgc)
install(FILES kdenlivesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR})
ecm_qt_declare_logging_category(kdenlive_SRCS HEADER kdenlive_debug.h IDENTIFIER KDENLIVE_LOG CATEGORY_NAME org.kde.multimedia.kdenlive)
qt5_add_dbus_adaptor(kdenlive_SRCS org.kdenlive.MainWindow.xml mainwindow.h MainWindow)
## UI's
file(GLOB kdenlive_UIS "ui/*.ui")
ki18n_wrap_ui(kdenlive_UIS ${kdenlive_UIS})
## MOC
qt5_wrap_cpp(kdenlive_MOC definitions.h)
set_property(SOURCE definitions.h PROPERTY SKIP_AUTOMOC ON)
add_library(kdenliveLib STATIC ${kdenlive_SRCS} ${kdenlive_UIS} ${kdenlive_MOC})
add_executable(kdenlive
main.cpp
${kdenlive_extra_SRCS}
)
target_link_libraries(kdenlive
kdenliveLib
)
qt5_add_resources(kdenlive_extra_SRCS icons.qrc ui/resources.qrc uiresources.qrc)
add_executable(kdenlive main.cpp ${kdenlive_extra_SRCS})
target_link_libraries(kdenlive kdenliveLib)
install(TARGETS kdenlive DESTINATION ${BIN_INSTALL_DIR})
# To compile kiss_fft.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
install(FILES kdenliveui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdenlive)
# KDE definitions and include directories *must* always come first, Qt follows
# (to avoid breaking builds when KDE and/or Qt are installed to different
# prefixes).
if(NOT WIN32)
find_package(PkgConfig QUIET)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=mltdatadir mlt-framework
OUTPUT_VARIABLE MLT_DATADIR
RESULT_VARIABLE MLT_DATADIR_failed)
if(NOT MLT_DATADIR_failed)
string(REGEX REPLACE "[\r\n]" "" MLT_DATADIR "${MLT_DATADIR}")
endif()
include_directories(
${CMAKE_BINARY_DIR}
${MLT_INCLUDE_DIR}
${MLTPP_INCLUDE_DIR}
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=meltbin mlt-framework
OUTPUT_VARIABLE MLT_MELTBIN
RESULT_VARIABLE MLT_MELTBIN_failed)
if(NOT MLT_MELTBIN_failed)
string(REGEX REPLACE "[\r\n]" "" MLT_MELTBIN "${MLT_MELTBIN}")
endif()
else()
set(MLT_MELTBIN "melt.exe")
set(MLT_DATADIR "../share/mlt")
endif()
configure_file(mlt_config.h.in ${CMAKE_BINARY_DIR}/mlt_config.h)
target_include_directories(kdenliveLib
PRIVATE ${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/lib/external
${CMAKE_CURRENT_SOURCE_DIR}/lib
)
SYSTEM ${MLT_INCLUDE_DIR} ${MLTPP_INCLUDE_DIR})
# Adds Qt definitions and include directories, and sets QT_LIBRARIES according
# to the components requested in find_package().
#include(${QT_USE_FILE})
execute_process(COMMAND touch "${CMAKE_BINARY_DIR}/rttr-install/librttr_core.a")
ADD_LIBRARY(RTTR STATIC IMPORTED)
SET_TARGET_PROPERTIES(RTTR PROPERTIES IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/rttr-install/librttr_core.a")
# KDE definitions and include directories *must* always come first, Qt follows
# (to avoid breaking builds when KDE and/or Qt are installed to different
# prefixes).
target_link_libraries(kdenliveLib
KF5::WidgetsAddons
KF5::Archive
......@@ -284,79 +126,80 @@ target_link_libraries(kdenliveLib
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
kiss_fft
RTTR
#RTTR::Core_Lib