1383fb7b7SEd Tanouscmake_minimum_required (VERSION 3.5 FATAL_ERROR) 2383fb7b7SEd Tanous 3383fb7b7SEd Tanousadd_definitions (-DMCTP_LOG_STDERR) 4cc0eddaaSJames Feistadd_definitions (-DMCTP_HAVE_FILEIO) 5*682232eaSAndrew Jefferyadd_definitions (-DMCTP_HAVE_STDIO) 6383fb7b7SEd Tanous 76579c76dSJames Feistadd_library (libmctp STATIC alloc.c core.c log.c libmctp.h serial.c) 8383fb7b7SEd Tanous 96579c76dSJames Feisttarget_include_directories (libmctp PUBLIC 106579c76dSJames Feist $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> 11383fb7b7SEd Tanous $<INSTALL_INTERFACE:include/libmctp) 12383fb7b7SEd Tanous 13383fb7b7SEd Tanousenable_testing () 14383fb7b7SEd Tanous 156579c76dSJames Feistadd_executable (test_eid tests/test_eid.c tests/test-utils.c) 166579c76dSJames Feisttarget_link_libraries (test_eid libmctp) 17383fb7b7SEd Tanous 186579c76dSJames Feistadd_executable (test_seq tests/test_seq.c tests/test-utils.c) 196579c76dSJames Feisttarget_link_libraries (test_seq libmctp) 20383fb7b7SEd Tanous 21383fb7b7SEd Tanousinstall (TARGETS libmctp DESTINATION lib) 22383fb7b7SEd Tanousinstall (FILES libmctp.h DESTINATION include) 236579c76dSJames Feist 24