blob: 3650719ed1ef62f16500a0c0f5d7248c48b24683 [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001# Name of the subproject
2Project("libfdproto" C)
3
4# Configuration for newer cmake
5cmake_policy(VERSION 2.6)
6if (POLICY CMP0022)
7 cmake_policy(SET CMP0022 OLD)
8endif (POLICY CMP0022)
9
10# List of source files for the library
11SET(LFDPROTO_SRC
12 fdproto-internal.h
13 dictionary.c
14 dictionary_functions.c
15 dispatch.c
16 fifo.c
17 init.c
18 lists.c
19 log.c
20 messages.c
21 ostr.c
22 portability.c
23 rt_data.c
24 sessions.c
25 utils.c
26 version.c
27 )
28
29
30# Save the list of files for testcases in the core's directory
31SET(LFDPROTO_SRC ${LFDPROTO_SRC} PARENT_SCOPE)
32
33# Include path
34INCLUDE_DIRECTORIES(${LFDPROTO_INCLUDES})
35
36# Build as a shared library
37ADD_LIBRARY(libfdproto SHARED ${LFDPROTO_SRC})
38
39ADD_DEPENDENCIES(libfdproto version_information)
40
41# Avoid the liblib name, and set the version
42SET_TARGET_PROPERTIES(libfdproto PROPERTIES
43 OUTPUT_NAME "fdproto"
44 SOVERSION ${FD_PROJECT_VERSION_API}
45 VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV}
46 LINK_INTERFACE_LIBRARIES "${LFDPROTO_LINK_INTERFACES}")
47
48# The library itself needs other libraries
49TARGET_LINK_LIBRARIES(libfdproto ${LFDPROTO_LIBS})
50
51
52####
53## INSTALL section ##
54
55INSTALL(TARGETS libfdproto
56 LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX}
57 COMPONENT freeDiameter-common)
58