Changeset 658:f198d16fa7f4 in freeDiameter for libfdcore/CMakeLists.txt
- Timestamp:
- Jan 14, 2011, 3:15:23 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/CMakeLists.txt
r592 r658 1 1 # The subproject name 2 Project("freeDiameter d" C)2 Project("freeDiameter core library" C) 3 3 4 4 # Configuration parser … … 8 8 9 9 # List of source files 10 SET(FD _COMMON_SRC11 f D.h10 SET(FDCORE_SRC 11 fdcore-internal.h 12 12 apps.c 13 13 cnxctx.h 14 14 config.c 15 core.c 15 16 cnxctx.c 16 17 endpoints.c … … 35 36 36 37 IF(NOT DISABLE_SCTP) 37 SET(FD _COMMON_SRC ${FD_COMMON_SRC} sctp.c sctps.c)38 SET(FDCORE_SRC ${FDCORE_SRC} sctp.c sctps.c) 38 39 ENDIF(NOT DISABLE_SCTP) 39 40 40 SET(FD _COMMON_GEN_SRC41 SET(FDCORE_GEN_SRC 41 42 lex.fdd.c 42 43 fdd.tab.c … … 45 46 46 47 # Save the list of files for the tests 47 SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE) 48 SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE) 49 50 51 # Require GNU TLS for building the daemon 52 FIND_PACKAGE(GnuTLS REQUIRED) 53 INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIR}) 54 SET(FD_LIBS ${FD_LIBS} ${GNUTLS_LIBRARIES}) 55 find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h) 56 If ( NOT GCRYPT_INCLUDE_DIR ) 57 MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent") 58 Endif ( NOT GCRYPT_INCLUDE_DIR ) 59 MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR) 60 INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR}) 61 62 # Also we need libgcrypt to... display its version :( 63 find_library(GCRYPT_LIBRARY 64 NAMES gcrypt 65 ) 66 If ( NOT GCRYPT_LIBRARY ) 67 MESSAGE(SEND_ERROR "Unable to find libgcrypt, please install libgcrypt or equivalent") 68 Endif ( NOT GCRYPT_LIBRARY ) 69 SET(FD_LIBS ${FD_LIBS} ${GCRYPT_LIBRARY}) 70 48 SET(FDCORE_SRC ${FDCORE_SRC} PARENT_SCOPE) 49 SET(FDCORE_GEN_SRC ${FDCORE_GEN_SRC} PARENT_SCOPE) 71 50 72 51 73 52 # Build the executable 74 ADD_ EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c)53 ADD_LIBRARY(libfdcore SHARED ${FDCORE_SRC} ${FDCORE_GEN_SRC}) 75 54 76 # The version 77 SET_TARGET_PROPERTIES(freeDiameterd PROPERTIES 55 # Avoid the liblib name, and set the version 56 SET_TARGET_PROPERTIES(libfdcore PROPERTIES 57 OUTPUT_NAME "fdcore" 58 SOVERSION ${FD_PROJECT_VERSION_API} 78 59 VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV}) 79 60 80 # The li nk command81 LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libf reeDiameter)82 TARGET_LINK_LIBRARIES( freeDiameterd libfreeDiameter ${FD_LIBS})61 # The library itself needs other libraries 62 LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfdproto) 63 TARGET_LINK_LIBRARIES(libfdcore libfdproto ${LFDCORE_LIBS}) 83 64 84 # The unary tests directory85 IF ( BUILD_TESTING )86 SUBDIRS(tests)87 ENDIF ( BUILD_TESTING )88 65 89 66 #### 90 67 ## INSTALL section ## 91 68 92 INSTALL(TARGETS freeDiameterd93 RUNTIME DESTINATION ${INSTALL_DAEMON_SUFFIX}94 COMPONENT freeDiameter- daemon)69 INSTALL(TARGETS libfdcore 70 LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX} 71 COMPONENT freeDiameter-common)
Note: See TracChangeset
for help on using the changeset viewer.