Commit 2001ceb9 authored by Vincent Pinon's avatar Vincent Pinon

Allow to use external RTTR

parent 186c1490
......@@ -124,7 +124,11 @@ if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
endif()
endif()
include(rttr.CMakeLists.txt)
find_package(RTTR 0.9.6 QUIET)
if(NOT RTTR_FOUND)
message("RTTR not found on system, will download source and build it")
include(rttr.CMakeLists.txt)
endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......
......@@ -15,8 +15,8 @@ if(NOT EXISTS "${install_dir}/lib/librttr_core.a")
file(WRITE "${install_dir}/lib/librttr_core.a" "dummy file to be replaced by build")
endif()
add_library(rttr_core STATIC IMPORTED)
add_dependencies(rttr_core rttr_project)
set_target_properties(rttr_core PROPERTIES
add_library(RTTR::Core_Lib STATIC IMPORTED)
add_dependencies(RTTR::Core_Lib rttr_project)
set_target_properties(RTTR::Core_Lib PROPERTIES
IMPORTED_LOCATION "${install_dir}/lib/librttr_core.a"
INTERFACE_INCLUDE_DIRECTORIES "${install_dir}/include")
......@@ -139,8 +139,7 @@ target_link_libraries(kdenliveLib
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
kiss_fft
rttr_core)
add_dependencies(kdenliveLib rttr_project)
RTTR::Core_Lib)
if(BUILD_COVERAGE)
target_link_libraries(kdenliveLib gcov)
......@@ -166,6 +165,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
# Optional deps
if(DRMINGW_FOUND)
target_compile_definitions(kdenlive PRIVATE -DUSE_DRMINGW)
target_include_directories(kdenlive PRIVATE SYSTEM ${DRMINGW_INCLUDE_DIR})
target_link_libraries(kdenlive ${DRMINGW_LIBRARY})
elseif(KF5Crash_FOUND)
target_compile_definitions(kdenlive PRIVATE -DKF5_USE_CRASH)
......
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