File: CMakeLists.txt

package info (click to toggle)
libnetconf2 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 3,612 kB
  • sloc: ansic: 37,068; xml: 437; sh: 49; makefile: 20
file content (21 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if(NOT LIBNETCONF2_VERSION)
    message(FATAL_ERROR "Please use the root CMakeLists file instead.")
endif()

# correct RPATH usage on OS X
set(CMAKE_MACOSX_RPATH TRUE)

# include all the library headers
include_directories(BEFORE "${CMAKE_SOURCE_DIR}/src")

# generate example header
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
configure_file(example.h.in example.h)

# list of all the examples
set(examples server client)

foreach(app_name IN LISTS examples)
    add_executable(${app_name} ${app_name}.c)
    target_link_libraries(${app_name} netconf2)
endforeach(app_name)