Navigation


Changeset 668:4ef3b7cdf734 in freeDiameter


Ignore:
Timestamp:
Jan 17, 2011, 2:08:08 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Some more cleanups in linking

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • contrib/debian/control

    r660 r668  
    129129Package: freediameter-radius-gateway
    130130Architecture: any
    131 Depends: ${misc:Depends}, freediameter-common (= ${binary:Version})
     131Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version})
    132132Suggests: freediameter-dictionary-rfc4072 (= ${binary:Version}), freediameter-dictionary-rfc4740 (= ${binary:Version})
    133133Description: RADIUS/Diameter extensible gateway.
     
    162162Package: freediameter-accounting-server
    163163Architecture: any
    164 Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}), libpq5
     164Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libpq5
    165165Suggests: freediameter-dictionary-rfc4072
    166166Description: freeDiameter simple Accounting server.
     
    182182Package: freediameter-eap-server
    183183Architecture: any
    184 Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}), libmysqlclient16, freediameter-dictionary-rfc4072 (= ${binary:Version})
     184Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libmysqlclient16, freediameter-dictionary-rfc4072 (= ${binary:Version})
    185185Description: freeDiameter Diameter EAP server implementation.
    186186 This freeDiameter extension implements a Diameter EAP server.
     
    197197Package: freediameter-sip-server
    198198Architecture: any
    199 Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}), libmysqlclient16, freediameter-dictionary-rfc4740 (= ${binary:Version})
     199Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libmysqlclient16, freediameter-dictionary-rfc4740 (= ${binary:Version})
    200200Description: freeDiameter Diameter SIP server implementation.
    201201 This freeDiameter extension implements a prototype
  • include/freeDiameter/CMakeLists.txt

    r666 r668  
    1616OPTION(ERRORS_ON_TODO "(development) Generate compilation errors on TODO items ?" OFF)
    1717
     18# Create the absolute path for searching extensions
     19SET(DEFAULT_EXTENSIONS_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_EXTENSIONS_SUFFIX})
     20
     21
    1822MARK_AS_ADVANCED(DISABLE_SCTP DEBUG_SCTP SCTP_USE_MAPPED_ADDRESSES ERRORS_ON_TODO)
    1923
    2024########################
    21 # System checks
     25### System checks part
    2226
    2327INCLUDE (CheckLibraryExists)
     
    2832INCLUDE (TestBigEndian)
    2933
    30 # Check byte ordering
    31 TEST_BIG_ENDIAN(HOST_BIG_ENDIAN)
     34
     35### System checks -- mandatory support
    3236
    3337# We need the getopt_long function
     
    3741ENDIF (NOT HAVE_LONG_OPTIONS)
    3842
     43# getifaddrs ?
     44CHECK_FUNCTION_EXISTS (getifaddrs HAVE_GETIFADDRS)
     45IF (NOT HAVE_GETIFADDRS)
     46   MESSAGE(SEND_ERROR "The getifaddrs function is currently required by freeDiameter.")
     47ENDIF (NOT HAVE_GETIFADDRS)
     48
     49
     50### System checks -- for freeDiameter-host.h
     51
     52# Check byte ordering
     53TEST_BIG_ENDIAN(HOST_BIG_ENDIAN)
     54
    3955# Check if ntohll is provided on the system
    4056CHECK_SYMBOL_EXISTS(ntohll "" HAVE_NTOHLL)
     
    4359CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
    4460
    45 # getifaddrs ?
    46 CHECK_FUNCTION_EXISTS (getifaddrs HAVE_GETIFADDRS)
    47 IF (NOT HAVE_GETIFADDRS)
    48    MESSAGE(SEND_ERROR "The getifaddrs function is currently required by freeDiameter.")
    49 ENDIF (NOT HAVE_GETIFADDRS)
     61
     62### System checks -- for includes / link
    5063
    5164# pthreads
    5265INCLUDE(FindThreads)
     66SET(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)
    5367
    5468# clock_gettime
     
    6781   ENDIF (HAVE_LIBRT)
    6882ENDIF (HAVE_CLOCK_GETTIME)
    69 
    70 # LFDPROTO_LIBS = libraries required by the libfdproto.
    71 SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)
    72 
     83SET(CLOCK_GETTIME_LIBS ${CLOCK_GETTIME_LIBS} PARENT_SCOPE)
    7384
    7485# dlopen and dlclose: CMAKE_DL_LIBS
     
    95106        MESSAGE(STATUS "Disabled SCTP support.")
    96107ENDIF(NOT DISABLE_SCTP)
     108SET(SCTP_INCLUDE_DIR ${SCTP_INCLUDE_DIR} PARENT_SCOPE)
     109SET(SCTP_LIBRARIES ${SCTP_LIBRARIES} PARENT_SCOPE)
    97110
    98111
    99112# Require GNU TLS for building the library
    100113FIND_PACKAGE(GnuTLS REQUIRED)
     114SET(GNUTLS_INCLUDE_DIR ${GNUTLS_INCLUDE_DIR} PARENT_SCOPE)
     115SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARIES} PARENT_SCOPE)
    101116
    102117find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h)
     
    105120Endif ( NOT GCRYPT_INCLUDE_DIR )
    106121MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR)
     122SET(GCRYPT_INCLUDE_DIR ${GCRYPT_INCLUDE_DIR} PARENT_SCOPE)
    107123
    108124# Also we need libgcrypt to... display its version :(
     
    113129        MESSAGE(SEND_ERROR "Unable to find libgcrypt, please install libgcrypt or equivalent")
    114130Endif ( NOT GCRYPT_LIBRARY )
     131SET(GCRYPT_LIBRARY ${GCRYPT_LIBRARY} PARENT_SCOPE)
    115132
    116133
    117 # LFDCORE_LIBS = libraries required by the libfdcore
    118 SET(LFDCORE_LIBS ${CMAKE_DL_LIBS} ${SCTP_LIBRARIES} ${GCRYPT_LIBRARY} ${GNUTLS_LIBRARIES} PARENT_SCOPE)
     134##########################
     135
     136# LFDPROTO_LIBS = libraries required by the libfdproto.
     137SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)
     138# Dependencies: the libraries required by any code linking to libfdproto.
     139SET(LFDPROTO_LINK_INTERFACES ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)
     140
     141# LFDCORE_LIBS = libraries required by the libfdcore (in addition to libfdproto and its dependencies)
     142SET(LFDCORE_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_DL_LIBS} ${SCTP_LIBRARIES} ${GCRYPT_LIBRARY} ${GNUTLS_LIBRARIES} PARENT_SCOPE)
     143# And includes paths
    119144SET(LFDCORE_INCLUDES ${SCTP_INCLUDE_DIR} ${GNUTLS_INCLUDE_DIR} ${GCRYPT_INCLUDE_DIR} PARENT_SCOPE)
    120 
    121 ##########################
    122 # Create the absolute path for searching extensions
    123 SET(DEFAULT_EXTENSIONS_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_EXTENSIONS_SUFFIX})
     145# And dependencies
     146SET(LFDCORE_LINK_INTERFACES "" PARENT_SCOPE) # We don't force any other library, the programs will link with what they needs
     147                                             # (such as libgnutls if they use GNUTLS_DEBUG() macro)
    124148
    125149##########################
  • libfdcore/CMakeLists.txt

    r666 r668  
    5959        OUTPUT_NAME "fdcore"
    6060        SOVERSION ${FD_PROJECT_VERSION_API}
    61         VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV})
     61        VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV}
     62        LINK_INTERFACE_LIBRARIES "${LFDCORE_LINK_INTERFACES}")
    6263
    6364# The library itself needs other libraries
  • libfdproto/CMakeLists.txt

    r658 r668  
    2626        OUTPUT_NAME "fdproto"
    2727        SOVERSION ${FD_PROJECT_VERSION_API}
    28         VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV})
     28        VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV}
     29        LINK_INTERFACE_LIBRARIES "${LFDPROTO_LINK_INTERFACES}")
    2930
    3031# The library itself needs other libraries
  • tests/CMakeLists.txt

    r667 r668  
    9090FOREACH( TEST ${TEST_LIST} )
    9191   ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h ${${TEST}_ADDITIONAL})
    92    TARGET_LINK_LIBRARIES(${TEST} libfdproto libfdcore ${${TEST}_ADDITIONAL_LIB})
     92   TARGET_LINK_LIBRARIES(${TEST} libfdproto libfdcore ${${TEST}_ADDITIONAL_LIB} ${CLOCK_GETTIME_LIBS})
    9393   ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST})
    9494ENDFOREACH( TEST )
Note: See TracChangeset for help on using the changeset viewer.