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.
35 lines
1.1 KiB
CMake
35 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(advanced-scene-switcher-midi)
|
|
|
|
# --- Check libremidi requirements ---
|
|
|
|
get_target_property(ADVSS_SOURCE_DIR advanced-scene-switcher-lib SOURCE_DIR)
|
|
set(LIBREMIDI_DIR "${ADVSS_SOURCE_DIR}/deps/libremidi")
|
|
|
|
if(NOT EXISTS "${LIBREMIDI_DIR}/CMakeLists.txt")
|
|
message(WARNING "libremidi directory \"${LIBREMIDI_DIR}\" not found!\n"
|
|
"MIDI support will be disabled!")
|
|
return()
|
|
endif()
|
|
add_subdirectory("${LIBREMIDI_DIR}" "${LIBREMIDI_DIR}/build" EXCLUDE_FROM_ALL)
|
|
|
|
if(MSVC)
|
|
target_compile_options(libremidi PRIVATE /wd4251 /wd4267 /wd4275)
|
|
endif(MSVC)
|
|
|
|
# --- End of section ---
|
|
|
|
add_library(${PROJECT_NAME} MODULE)
|
|
|
|
target_sources(
|
|
${PROJECT_NAME}
|
|
PRIVATE macro-condition-midi.cpp macro-condition-midi.hpp
|
|
macro-action-midi.cpp macro-action-midi.hpp midi-helpers.cpp
|
|
midi-helpers.hpp)
|
|
|
|
setup_advss_plugin(${PROJECT_NAME})
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
|
|
target_include_directories(${PROJECT_NAME} PRIVATE "${LIBREMIDI_DIR}/include")
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE libremidi)
|
|
install_advss_plugin(${PROJECT_NAME})
|