Build: add GCC-13, Clang-14, Clang-15, Clang-16, Clang-17
[marnav.git] / examples / CMakeLists.txt
blobe3daefa6f29fa228819cbeba4b4259be2b95afb8
1 find_package(Boost 1.53.0 COMPONENTS system)
3 if(NOT MSVC)
4         set_property(DIRECTORY PROPERTY COMPILE_OPTIONS
5                 -pipe
6                 -ggdb
7                 -Wall
8                 -Wextra
9                 -pedantic-errors
10                 )
11 endif()
13 add_executable(parse_nmea parse_nmea.cpp)
14 target_link_libraries(parse_nmea marnav::marnav)
16 add_executable(seatalk_snippets seatalk_snippets.cpp)
17 target_link_libraries(seatalk_snippets marnav::marnav)
19 add_executable(create_nmea_from_ais create_nmea_from_ais.cpp)
20 target_link_libraries(create_nmea_from_ais marnav::marnav)
22 add_executable(create_nmea_from_ais_2 create_nmea_from_ais_2.cpp)
23 target_link_libraries(create_nmea_from_ais_2 marnav::marnav)
25 add_executable(parse_ais parse_ais.cpp)
26 target_link_libraries(parse_ais marnav::marnav)
28 if(NOT MSVC)
29         add_executable(select select.cpp)
30         target_link_libraries(select marnav::marnav)
31 endif()
33 add_executable(bitset_iterate bitset_iterate.cpp)
34 target_link_libraries(bitset_iterate marnav::marnav)
36 if(TARGET marnav::marnav-io)
37         add_executable(read_seatalk read_seatalk.cpp)
38         target_link_libraries(read_seatalk marnav::marnav marnav::marnav-io)
40         add_executable(read_ais read_ais.cpp)
41         target_link_libraries(read_ais marnav::marnav marnav::marnav-io)
43         add_executable(nmea_multiplexer nmea_multiplexer.cpp)
44         target_link_libraries(nmea_multiplexer marnav::marnav marnav::marnav-io)
46         add_executable(read_nmea read_nmea.cpp)
47         target_link_libraries(read_nmea marnav::marnav marnav::marnav-io)
48 endif()
50 if(Boost_FOUND AND (TARGET marnav::marnav-io))
51         add_executable(read_nmea_boostasio read_nmea_boostasio.cpp)
52         target_include_directories(read_nmea_boostasio PRIVATE ${Boost_INCLUDE_DIRS})
53         target_link_libraries(read_nmea_boostasio
54                 marnav::marnav
55                 marnav::marnav-io
56                 ${Boost_LIBRARIES}
57                 pthread
58                 )
60         add_executable(seatalk_nmea_converter simple_seatalk_nmea_converter.cpp)
61         target_include_directories(seatalk_nmea_converter PRIVATE ${Boost_INCLUDE_DIRS})
62         target_link_libraries(seatalk_nmea_converter
63                 marnav::marnav
64                 marnav::marnav-io
65                 ${Boost_LIBRARIES}
66                 pthread
67                 )
69         add_executable(serial_to_tcp serial_to_tcp.cpp)
70         target_include_directories(serial_to_tcp PRIVATE ${Boost_INCLUDE_DIRS})
71         target_link_libraries(serial_to_tcp
72                 marnav::marnav
73                 marnav::marnav-io
74                 ${Boost_LIBRARIES}
75                 pthread
76                 )
77 endif()
79 add_subdirectory(qtnmeadiag)