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
option(XLAP "Run XLAP to trace packets." OFF)

Andreas Schmidt's avatar
Andreas Schmidt committed
9
if (XLAP)
Andreas Schmidt's avatar
Andreas Schmidt committed
10 11 12
    add_definitions(-DXLAP)
endif()

Andreas Schmidt's avatar
Andreas Schmidt committed
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 24
add_subdirectory(util)

add_executable(sender sender.c)
add_executable(receiver receiver.c)
25 26
add_executable(time-sender time-sender.c)
add_executable(time-receiver time-receiver.c)
27

Andreas Schmidt's avatar
Andreas Schmidt committed
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

Andreas Schmidt's avatar
Andreas Schmidt committed
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)
Andreas Schmidt's avatar
Andreas Schmidt committed
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")