CMakeLists.txt 1.07 KB
Newer Older
1 2 3 4 5 6
option (DEBUG "Enable debug output.")

if (DEBUG)
    add_definitions(-DDEBUG)
endif()

Andreas Schmidt's avatar
Andreas Schmidt committed
7 8 9 10 11 12
option(XLAP "Run XLAP to trace packets." OFF)

if (XLAP)
    add_definitions(-DXLAP)
endif()

13 14 15 16 17 18
option (TCP "Set time protocol to TCP.")

if (TCP)
    add_definitions(-DTCP)
endif()

Andreas Schmidt's avatar
Andreas Schmidt committed
19

20
add_subdirectory(proto)
21 22 23
add_subdirectory(util)

add_executable(sender sender.c)
rna's avatar
rna committed
24
add_executable(receiver receiver.c)
25 26
add_executable(time-sender time-sender.c)
add_executable(time-receiver time-receiver.c)
27

28 29
target_link_libraries(sender LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(receiver LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
30

31 32
target_link_libraries(time-sender LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(time-receiver LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
33 34

add_executable(refcount refcount.c)
35 36 37 38
target_link_libraries(refcount LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})

install(DIRECTORY ./ DESTINATION include/prrt
        FILES_MATCHING PATTERN "*.h")