blob: a5b1042f02532b8e4674b938a6b02b6a65dae39e [file] [log] [blame]
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
add_definitions (-DMCTP_LOG_STDERR)
add_definitions (-DMCTP_FILEIO)
add_library (libmctp STATIC alloc.c core.c log.c libmctp.h serial.c)
target_include_directories (libmctp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/libmctp)
enable_testing ()
add_executable (test_eid tests/test_eid.c tests/test-utils.c)
target_link_libraries (test_eid libmctp)
add_executable (test_seq tests/test_seq.c tests/test-utils.c)
target_link_libraries (test_seq libmctp)
install (TARGETS libmctp DESTINATION lib)
install (FILES libmctp.h DESTINATION include)