mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-24 23:08:07 -05:00
The "core" macro conditions and actions have been extracted out to the "base" plugin. The library now mostly contains functionality which is required across all plugins and (e.g. definitions for macro segments). The goal is to reduce the complexity and cross-dependencies and group the source files in a better way. This should relsove the "library limit of 65535 objects exceeded" build issue occuring in some Windows build environments.
63 lines
2.0 KiB
CMake
63 lines
2.0 KiB
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(advanced-scene-switcher-opencv)
|
|
|
|
# --- Check OpenCV requirements ---
|
|
|
|
get_target_property(ADVSS_SOURCE_DIR advanced-scene-switcher-lib SOURCE_DIR)
|
|
|
|
find_package(OpenCV)
|
|
if(NOT OpenCV_FOUND)
|
|
message(
|
|
WARNING
|
|
"OpenCV not found!\n" "Video condition will be disabled!\n\n"
|
|
"OpenCV sources are available under: ${ADVSS_SOURCE_DIR}/deps/opencv")
|
|
return()
|
|
endif()
|
|
|
|
# --- Check optional OCR dependencies ---
|
|
|
|
find_package(Leptonica)
|
|
find_package(Tesseract)
|
|
|
|
# --- End of section ---
|
|
|
|
add_library(${PROJECT_NAME} MODULE)
|
|
|
|
if(Leptonica_FOUND AND Tesseract_FOUND)
|
|
target_compile_definitions(${PROJECT_NAME} PRIVATE OCR_SUPPORT)
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Tesseract::libtesseract
|
|
${Leptonica_LIBRARIES})
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${Tesseract_INCLUDE_DIRS}
|
|
${Leptonica_INCLUDE_DIRS})
|
|
else()
|
|
message(
|
|
WARNING "OCR capabilities of video condition disabled!\n"
|
|
"Leptonica or Tesseract dependencies were not found!\n\n"
|
|
"Sources are available under: ${ADVSS_SOURCE_DIR}/deps/leptonica")
|
|
endif()
|
|
|
|
target_sources(
|
|
${PROJECT_NAME}
|
|
PRIVATE area-selection.cpp
|
|
area-selection.hpp
|
|
macro-condition-video.cpp
|
|
macro-condition-video.hpp
|
|
opencv-helpers.cpp
|
|
opencv-helpers.hpp
|
|
paramerter-wrappers.cpp
|
|
paramerter-wrappers.hpp
|
|
preview-dialog.cpp
|
|
preview-dialog.hpp)
|
|
|
|
setup_advss_plugin(${PROJECT_NAME})
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${OpenCV_INCLUDE_DIRS})
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${OpenCV_LIBRARIES})
|
|
|
|
install_advss_plugin(${PROJECT_NAME})
|
|
if(NOT OS_LINUX)
|
|
install_advss_plugin_dependency(TARGET ${PROJECT_NAME} DEPENDENCIES
|
|
${OpenCV_LIBS})
|
|
endif()
|