ADD: Adds files for initial build of the library.
This commit is contained in:
41
CMakeLists.txt
Executable file
41
CMakeLists.txt
Executable file
@@ -0,0 +1,41 @@
|
||||
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
|
||||
project (whisper-com VERSION 0.1.0 LANGUAGES CXX C)
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
||||
include(defaultOptions)
|
||||
|
||||
IF(NOT TARGET Catch2)
|
||||
add_subdirectory(libs/Catch2 EXCLUDE_FROM_ALL)
|
||||
include(libs/Catch2/contrib/Catch.cmake)
|
||||
ENDIF()
|
||||
|
||||
add_compile_definitions(LOGURU_WITH_STREAMS SQLITE_THREADSAFE=2)
|
||||
IF(NOT TARGET loguru)
|
||||
add_subdirectory(libs/loguru EXCLUDE_FROM_ALL)
|
||||
ENDIF()
|
||||
|
||||
add_library(whisper-com STATIC
|
||||
include/WHISPER/whisper.hpp
|
||||
|
||||
)
|
||||
|
||||
target_link_libraries(whisper-com
|
||||
loguru
|
||||
)
|
||||
|
||||
target_include_directories(whisper-com PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
src)
|
||||
|
||||
#
|
||||
# Everything TEST related
|
||||
#
|
||||
option(TEST_WHISPER_COMMUNICATION_LIBRARY "Turn running of application template specific tests off" ON)
|
||||
|
||||
IF (${TEST_WHISPER_COMMUNICATION_LIBRARY})
|
||||
|
||||
add_executable(test_test tests/test_test.cpp)
|
||||
target_link_libraries(test_test Catch2::Catch2 whisper-com loguru)
|
||||
catch_discover_tests(test_test)
|
||||
|
||||
ENDIF()
|
||||
Reference in New Issue
Block a user