summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-27 23:52:56 -0500
committersanine <sanine.not@pm.me>2022-08-27 23:52:56 -0500
commita4dd0ad63c00f4dee3b86dfd3075d1d61b2b3180 (patch)
tree13bd5bfa15e6fea2a12f176bae79adf9c6fd0933 /CMakeLists.txt
parentbde3e4f1bb7b8f8abca0884a7d994ee1c17a66b1 (diff)
add plibsys
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 13 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b51a63f..c631e11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,25 +7,32 @@ project(
include_directories(${CMAKE_SOURCE_DIR}/include)
option(MOSSROSE_BUILD_EXAMPLES "Build the example programs" OFF)
+option(MOSSROSE_BUILD_TESTS "Build the tests" OFF)
-add_subdirectory(${CMAKE_SOURCE_DIR}/portaudio EXCLUDE_FROM_ALL)
+######## third-party libraries ########
+add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/portaudio EXCLUDE_FROM_ALL)
+add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/plibsys EXCLUDE_FROM_ALL)
add_library(mossrose)
-add_subdirectory(${CMAKE_SOURCE_DIR}/src)
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 (UNIX)
- target_link_libraries(mossrose pthread)
-endif()
+target_link_libraries(mossrose portaudio plibsys)
if (MOSSROSE_BUILD_EXAMPLES)
add_custom_target(examples)
add_subdirectory(${CMAKE_SOURCE_DIR}/examples)
endif()
+
+
+if (MOSSROSE_BUILD_TESTS)
+ add_executable(test)
+endif()
+
+
+add_subdirectory(${CMAKE_SOURCE_DIR}/src)