diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..aa4cffa --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "external/log4cxx"] + path = external/log4cxx + url = https://github.com/apache/logging-log4cxx.git diff --git a/CMakeLists.txt b/CMakeLists.txt index e7bd365..d0b7df3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,12 +6,16 @@ set(CMAKE_CXX_STANDARD 17) add_subdirectory(fluidsynth) add_subdirectory(magic_enum) add_subdirectory(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_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) \ No newline at end of file +target_link_libraries(tone-generator PRIVATE argparse) diff --git a/README.md b/README.md index 9f9ca8b..af5ea6d 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,19 @@ make tone-generator - AB-CD and CD-AB are valid. - AA-CD and BA-CD are not valid. -## Build with system packages? +## System packages Requires the following packages (debian) ``` sudo apt install libfluidsynth2 libfluidsynth-dev ``` +``` +liblog4cxx-dev/focal 0.10.0-15ubuntu2 amd64 + Logging library for C++ (development files) +liblog4cxx-doc/focal,focal 0.10.0-15ubuntu2 all + Documentation for log4cxx +``` May also need some soundfonts from: diff --git a/external/log4cxx b/external/log4cxx new file mode 160000 index 0000000..5354f9c --- /dev/null +++ b/external/log4cxx @@ -0,0 +1 @@ +Subproject commit 5354f9cb739c348c05ae9938ebaded843f78fd78