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