diff options
author | sanine <sanine.not@pm.me> | 2022-08-25 14:54:53 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-08-25 14:54:53 -0500 |
commit | 37c97e345d12f95dde44e1d1a4c2f2aadd4615bc (patch) | |
tree | e1bb25bc855883062bdd7847ff2c04290f71c840 /CMakeLists.txt | |
parent | 5634c7b04da619669f2f29f6798c03982be05180 (diff) |
add initial structure
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..07d5174 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.2) +project( + mossrose + VERSION 0.1.0 +) + + +option(MOSSROSE_BUILD_EXAMPLES "Build the example programs" OFF) + + +add_subdirectory(${CMAKE_SOURCE_DIR}/portaudio EXCLUDE_FROM_ALL) + +add_library(mossrose + ${CMAKE_SOURCE_DIR}/src/mossrose.c +) +set_target_properties(mossrose PROPERTIES + C_STANDARD 99 + CMAKE_C_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wpedantic" + VERSION ${PROJECT_VERSION} + PUBLIC_HEADER src/mossrose.h +) +target_link_libraries(mossrose portaudio) + + +if (MOSSROSE_BUILD_EXAMPLES) + include_directories(${CMAKE_SOURCE_DIR}/src) + add_custom_target(examples) + add_subdirectory(${CMAKE_SOURCE_DIR}/examples) +endif() |