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