-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (34 loc) · 1.05 KB
/
Copy pathCMakeLists.txt
File metadata and controls
41 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
project(lsdn C)
cmake_minimum_required(VERSION 2.8)
enable_testing()
include(CheckFunctionExists)
include(GNUInstallDirs)
option(BUILD_SHARED_LIBS "Build lsdn library as shared" ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(TCL)
set(CMAKE_REQUIRED_LIBRARIES ${TCL_LIBRARY})
check_function_exists(Tcl_ParseArgsObjv HAVE_TCL_PARSE)
if (NOT HAVE_TCL_PARSE)
message(FATAL_ERROR "Tcl >= 8.6 is required")
endif()
find_package(PkgConfig)
find_package(Uthash REQUIRED)
pkg_check_modules(JSONC json-c REQUIRED)
pkg_check_modules(MNL libmnl REQUIRED)
pkg_check_modules(LIBVIRT libvirt)
set(CMAKE_C_FLAGS "-std=gnu99 -Wall ${CMAKE_C_FLAGS}")
if(NOT ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
SET(OUT_TREE ON)
endif()
add_subdirectory(netmodel)
add_subdirectory(test)
add_subdirectory(lsctl)
add_subdirectory(daemon)
add_subdirectory(lsctlc)
if (LIBVIRT_FOUND)
add_subdirectory(hooks)
add_subdirectory(examples)
endif (LIBVIRT_FOUND)
add_custom_target(doc
./build-doc.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})