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 | |
Javier Bravo Conde | 13b0e7d | 2018-07-09 17:08:51 -0500 | [diff] [blame^] | 10 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
| 11 | |
Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame] | 12 | # List of source files for the library |
| 13 | SET(LFDPROTO_SRC |
| 14 | fdproto-internal.h |
| 15 | dictionary.c |
| 16 | dictionary_functions.c |
| 17 | dispatch.c |
| 18 | fifo.c |
| 19 | init.c |
| 20 | lists.c |
| 21 | log.c |
| 22 | messages.c |
| 23 | ostr.c |
| 24 | portability.c |
| 25 | rt_data.c |
| 26 | sessions.c |
| 27 | utils.c |
| 28 | version.c |
Javier Bravo Conde | 13b0e7d | 2018-07-09 17:08:51 -0500 | [diff] [blame^] | 29 | hashlist.cpp |
Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame] | 30 | ) |
| 31 | |
| 32 | |
| 33 | # Save the list of files for testcases in the core's directory |
| 34 | SET(LFDPROTO_SRC ${LFDPROTO_SRC} PARENT_SCOPE) |
| 35 | |
| 36 | # Include path |
| 37 | INCLUDE_DIRECTORIES(${LFDPROTO_INCLUDES}) |
| 38 | |
| 39 | # Build as a shared library |
| 40 | ADD_LIBRARY(libfdproto SHARED ${LFDPROTO_SRC}) |
| 41 | |
| 42 | ADD_DEPENDENCIES(libfdproto version_information) |
| 43 | |
| 44 | # Avoid the liblib name, and set the version |
| 45 | SET_TARGET_PROPERTIES(libfdproto PROPERTIES |
| 46 | OUTPUT_NAME "fdproto" |
| 47 | SOVERSION ${FD_PROJECT_VERSION_API} |
| 48 | VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV} |
| 49 | LINK_INTERFACE_LIBRARIES "${LFDPROTO_LINK_INTERFACES}") |
| 50 | |
| 51 | # The library itself needs other libraries |
| 52 | TARGET_LINK_LIBRARIES(libfdproto ${LFDPROTO_LIBS}) |
| 53 | |
| 54 | |
| 55 | #### |
| 56 | ## INSTALL section ## |
| 57 | |
| 58 | INSTALL(TARGETS libfdproto |
| 59 | LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX} |
| 60 | COMPONENT freeDiameter-common) |
| 61 | |