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