Roman Janota | 907cf93 | 2022-06-03 12:33:34 +0200 | [diff] [blame^] | 1 | if(NOT LIBNETCONF2_VERSION) |
| 2 | message(FATAL_ERROR "Please use the root CMakeLists file instead.") |
| 3 | endif() |
| 4 | |
| 5 | # correct RPATH usage on OS X |
| 6 | set(CMAKE_MACOSX_RPATH TRUE) |
| 7 | |
| 8 | # include all the library headers |
| 9 | include_directories(BEFORE "${CMAKE_SOURCE_DIR}/src") |
| 10 | |
| 11 | # generate example header |
| 12 | include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) |
| 13 | configure_file(example.h.in example.h) |
| 14 | |
| 15 | # list of all the examples |
| 16 | set(examples server client) |
| 17 | |
| 18 | foreach(app_name IN LISTS examples) |
| 19 | add_executable(${app_name} ${app_name}.c) |
| 20 | target_link_libraries(${app_name} netconf2) |
| 21 | endforeach(app_name) |