| 1 | # Includes |
| 2 | include( ${CMAKE_CURRENT_SOURCE_DIR} |
| 3 | ${CMAKE_CURRENT_BINARY_DIR} |
| 4 | ) |
| 5 | |
| 6 | # Source includes |
| 7 | include_directories(${CMAKE_SOURCE_DIR}/src) |
| 8 | |
| 9 | # Targets |
| 10 | add_executable(simple simple.c) |
| 11 | add_executable(bitbang bitbang.c) |
| 12 | add_executable(bitbang2 bitbang2.c) |
| 13 | add_executable(bitbang_cbus bitbang_cbus.c) |
| 14 | add_executable(bitbang_ft2232 bitbang_ft2232.c) |
| 15 | add_executable(find_all find_all.c) |
| 16 | |
| 17 | # Linkage |
| 18 | target_link_libraries(simple ftdi) |
| 19 | target_link_libraries(bitbang ftdi) |
| 20 | target_link_libraries(bitbang2 ftdi) |
| 21 | target_link_libraries(bitbang_cbus ftdi) |
| 22 | target_link_libraries(bitbang_ft2232 ftdi) |
| 23 | target_link_libraries(find_all ftdi) |
| 24 | |
| 25 | # libftdi++ examples |
| 26 | if(FTDI_BUILD_CPP) |
| 27 | message(STATUS "Building libftdi++ examples.") |
| 28 | include_directories(${CMAKE_SOURCE_DIR}/ftdipp) |
| 29 | |
| 30 | # Targest |
| 31 | add_executable(find_all_pp find_all_pp.cpp) |
| 32 | |
| 33 | # Linkage |
| 34 | target_link_libraries(find_all_pp ftdipp) |
| 35 | endif() |