Update cmake

Based on obs-plugintemplate@68e9fcd
This commit is contained in:
WarmUpTill
2024-02-03 21:44:51 +01:00
committed by WarmUpTill
parent 77eb5ed286
commit 8e7955984e
43 changed files with 2234 additions and 646 deletions

View File

@@ -13,9 +13,17 @@ if(NOT EXISTS "${LIBREMIDI_DIR}/CMakeLists.txt")
endif()
add_subdirectory("${LIBREMIDI_DIR}" "${LIBREMIDI_DIR}/build" EXCLUDE_FROM_ALL)
if(MSVC)
target_compile_options(libremidi PRIVATE /wd4251 /wd4267 /wd4275)
endif(MSVC)
if(OS_WINDOWS)
if(MSVC)
target_compile_options(libremidi PUBLIC /wd4251 /wd4267 /wd4275)
endif()
else()
target_compile_options(
libremidi
PUBLIC -Wno-error=conversion -Wno-error=unused-result -Wno-error=shadow
-Wno-error=unused-parameter -Wno-error=deprecated-declarations
-Wno-error=sign-compare)
endif()
# --- End of section ---

View File

@@ -29,6 +29,9 @@ if(Leptonica_FOUND AND Tesseract_FOUND)
${Leptonica_LIBRARIES})
target_include_directories(${PROJECT_NAME} PRIVATE ${Tesseract_INCLUDE_DIRS}
${Leptonica_INCLUDE_DIRS})
if(OS_WINDOWS)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/ignore:4099")
endif()
else()
message(
WARNING "OCR capabilities of video condition disabled!\n"