cmake_minimum_required(VERSION 3.7.1)

project(SELCALToneGenerator VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)

add_subdirectory(external/fluidsynth)
add_subdirectory(external/magic_enum)
add_subdirectory(external/argparse)
add_subdirectory(external/log4cxx)

file(GLOB_RECURSE sources src/*.cpp src/*.h)
file(GLOB_RECURSE data resources/*)

add_executable(tone-generator ${sources} ${data})

target_include_directories(tone-generator PRIVATE $<TARGET_PROPERTY:log4cxx,INTERFACE_INCLUDE_DIRECTORIES>)

target_link_libraries(tone-generator PRIVATE log4cxx)
target_link_libraries(tone-generator PRIVATE libfluidsynth)
target_link_libraries(tone-generator PRIVATE magic_enum::magic_enum)
target_link_libraries(tone-generator PRIVATE argparse)
