Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame] | 1 | # Name of the subproject |
| 2 | Project("libfdproto" C) |
| 3 | |
| 4 | # Configuration for newer cmake |
| 5 | cmake_policy(VERSION 2.6) |
| 6 | if (POLICY CMP0022) |
| 7 | cmake_policy(SET CMP0022 OLD) |
| 8 | endif (POLICY CMP0022) |
| 9 | |
| 10 | # List of source files for the library |
| 11 | SET(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 |
| 31 | SET(LFDPROTO_SRC ${LFDPROTO_SRC} PARENT_SCOPE) |
| 32 | |
| 33 | # Include path |
| 34 | INCLUDE_DIRECTORIES(${LFDPROTO_INCLUDES}) |
| 35 | |
| 36 | # Build as a shared library |
| 37 | ADD_LIBRARY(libfdproto SHARED ${LFDPROTO_SRC}) |
| 38 | |
| 39 | ADD_DEPENDENCIES(libfdproto version_information) |
| 40 | |
| 41 | # Avoid the liblib name, and set the version |
| 42 | SET_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 |
| 49 | TARGET_LINK_LIBRARIES(libfdproto ${LFDPROTO_LIBS}) |
| 50 | |
| 51 | |
| 52 | #### |
| 53 | ## INSTALL section ## |
| 54 | |
| 55 | INSTALL(TARGETS libfdproto |
| 56 | LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX} |
| 57 | COMPONENT freeDiameter-common) |
| 58 | |