blob: 1f57073db69081ee4d9756de928cc87030b66985 [file] [log] [blame]
Ed Tanous383fb7b2019-02-11 11:22:30 -08001cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2
3add_definitions(-DMCTP_LOG_STDERR)
4add_definitions(-DMCTP_FILEIO)
5
6add_library(libmctp STATIC alloc.c core.c libmctp.h serial.c)
7
8target_include_directories(libmctp
9 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
10 $<INSTALL_INTERFACE:include/libmctp)
11
12enable_testing()
13
14add_executable(mctp-in-test tests/mctp-in.c)
15target_link_libraries(mctp-in-test libmctp)
16
17add_executable(mctp-pipe-test tests/mctp-pipe.c)
18target_link_libraries(mctp-pipe-test libmctp)
19
20install(TARGETS libmctp DESTINATION lib)
21install(FILES libmctp.h DESTINATION include)