| 1 | # Includes |
| 2 | include_directories( ${CMAKE_CURRENT_SOURCE_DIR} |
| 3 | ${CMAKE_CURRENT_BINARY_DIR} |
| 4 | ) |
| 5 | |
| 6 | # Targets |
| 7 | add_executable(simple simple.c) |
| 8 | add_executable(bitbang bitbang.c) |
| 9 | add_executable(bitbang2 bitbang2.c) |
| 10 | add_executable(bitbang_cbus bitbang_cbus.c) |
| 11 | add_executable(bitbang_ft2232 bitbang_ft2232.c) |
| 12 | add_executable(find_all find_all.c) |
| 13 | add_executable(serial_test serial_test.c) |
| 14 | add_executable(baud_test baud_test.c) |
| 15 | add_executable(stream_test stream_test.c) |
| 16 | add_executable(eeprom eeprom.c) |
| 17 | add_executable(async async.c) |
| 18 | |
| 19 | # Linkage |
| 20 | target_link_libraries(simple ftdi1) |
| 21 | target_link_libraries(bitbang ftdi1) |
| 22 | target_link_libraries(bitbang2 ftdi1) |
| 23 | target_link_libraries(bitbang_cbus ftdi1) |
| 24 | target_link_libraries(bitbang_ft2232 ftdi1) |
| 25 | target_link_libraries(find_all ftdi1) |
| 26 | target_link_libraries(serial_test ftdi1) |
| 27 | target_link_libraries(baud_test ftdi1) |
| 28 | target_link_libraries(stream_test ftdi1) |
| 29 | target_link_libraries(eeprom ftdi1) |
| 30 | target_link_libraries(async ftdi1) |
| 31 | |
| 32 | # libftdi++ examples |
| 33 | if( FTDIPP ) |
| 34 | include_directories(BEFORE ${CMAKE_SOURCE_DIR}/ftdipp |
| 35 | ${Boost_INCLUDE_DIRS}) |
| 36 | |
| 37 | # Target |
| 38 | add_executable(find_all_pp find_all_pp.cpp) |
| 39 | |
| 40 | # Linkage |
| 41 | target_link_libraries(find_all_pp ftdipp1) |
| 42 | endif( FTDIPP ) |
| 43 | |
| 44 | # Source includes |
| 45 | include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src) |