Commit 37d80b98 authored by Nicolas Carion's avatar Nicolas Carion

fix compilation

parent 09dbecf0
......@@ -18,6 +18,10 @@ if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
endif()
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" ON)
option(BUILD_TESTING "Build tests" ON)
......
......@@ -5,11 +5,19 @@ ExternalProject_Add(rttr_project
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
)
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")
file(MAKE_DIRECTORY "${install_dir}/lib")
add_custom_target(rttr_copy
COMMAND ${CMAKE_COMMAND} -E copy ${install_dir}/lib*/*.a ${install_dir}/lib
)
add_dependencies(rttr_copy rttr_project)
add_library(rttr_core STATIC IMPORTED)
add_dependencies(rttr_core rttr_copy)
#file(TOUCH "${install_dir}/lib/librttr_core.a")
execute_process(COMMAND touch "${install_dir}/lib/librttr_core.a")
set_target_properties(rttr_core PROPERTIES
......
### Find packages files
find_package(LibV4L2)
set_package_properties(LibV4L2 PROPERTIES
DESCRIPTION "video4linux support libraries"
URL "http://freecode.com/projects/libv4l"
TYPE RUNTIME
PURPOSE "Required for better webcam support")
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}/mlt_config.h)
### Find source files
add_subdirectory(abstractmodel)
add_subdirectory(assets)
......@@ -67,28 +99,6 @@ install(TARGETS kdenlive DESTINATION ${BIN_INSTALL_DIR})
install(FILES kdenliveui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdenlive)
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}/mlt_config.h)
target_include_directories(kdenliveLib
PRIVATE ${CMAKE_BINARY_DIR}
......@@ -191,12 +201,6 @@ elseif(SDL_FOUND)
target_link_libraries(kdenliveLib ${SDL_LIBRARY})
endif()
find_package(LibV4L2)
set_package_properties(LibV4L2 PROPERTIES
DESCRIPTION "video4linux support libraries"
URL "http://freecode.com/projects/libv4l"
TYPE RUNTIME
PURPOSE "Required for better webcam support")
if(LIBV4L2_FOUND)
target_include_directories(kdenliveLib PRIVATE SYSTEM ${LIBV4L2_INCLUDE_DIR})
target_link_libraries(kdenliveLib ${LIBV4L2_LIBRARY})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment