Navigation


Changeset 316:aa8f41bca657 in freeDiameter


Ignore:
Timestamp:
May 19, 2010, 11:54:55 AM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fixed libraries dependencies

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/CMakeLists.txt

    r313 r316  
    7474        SUBDIRS(tests)
    7575ENDIF ( NOT SKIP_TESTS )
    76 IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
    77   MARK_AS_ADVANCED(SKIP_TESTS)
    78 ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
    79 
    8076
    8177####
  • freeDiameter/tests/CMakeLists.txt

    r304 r316  
    4949# Create an archive with the daemon common files (all but main)
    5050ADD_LIBRARY(fDcore STATIC ${TEST_COMMON_SRC})
     51
    5152
    5253##############################
     
    107108FOREACH( TEST ${TEST_LIST} )
    108109   ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h ${${TEST}_ADDITIONAL})
    109    TARGET_LINK_LIBRARIES(${TEST} fDcore ${FD_LIBS} ${${TEST}_ADDITIONAL_LIB})
     110   TARGET_LINK_LIBRARIES(${TEST} fDcore ${FD_LIBS} ${LFD_LIBS} ${${TEST}_ADDITIONAL_LIB})
    110111   ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST})
    111112ENDFOREACH( TEST )
  • include/freeDiameter/CMakeLists.txt

    r313 r316  
    2828INCLUDE (TestBigEndian)
    2929
    30 # We use dlopen and dlclose
    31 SET(FD_LIBS ${FD_LIBS} ${CMAKE_DL_LIBS})
     30# Check byte ordering
     31TEST_BIG_ENDIAN(HOST_BIG_ENDIAN)
    3232
    33 # We need the threads library (pthread)
     33# We need the getopt_long function
     34CHECK_FUNCTION_EXISTS (getopt_long HAVE_LONG_OPTIONS)
     35IF (NOT HAVE_LONG_OPTIONS)
     36   MESSAGE(SEND_ERROR "The getopt_long function is not found, please add needed library in build system")
     37ENDIF (NOT HAVE_LONG_OPTIONS)
     38
     39# Check if ntohll is provided on the system
     40CHECK_SYMBOL_EXISTS(ntohll "" HAVE_NTOHLL)
     41
     42# malloc.h ?
     43CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
     44
     45
     46# pthreads
    3447INCLUDE(FindThreads)
    35 SET(FD_LIBS ${FD_LIBS} ${CMAKE_THREAD_LIBS_INIT})
    3648
    37 # We need the clock_gettime function ( -lrt, -lposix4 )
     49# clock_gettime
    3850CHECK_FUNCTION_EXISTS (clock_gettime HAVE_CLOCK_GETTIME)
    3951IF (HAVE_CLOCK_GETTIME)
     
    5062   ENDIF (HAVE_LIBRT)
    5163ENDIF (HAVE_CLOCK_GETTIME)
    52 SET(FD_LIBS ${FD_LIBS} ${CLOCK_GETTIME_LIBS})
     64
     65# LFD_LIBS = libraries required by the libfreeDiameter.
     66SET(LFD_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT})
     67
     68
     69# dlopen and dlclose: CMAKE_DL_LIBS
    5370
    5471# We need the sctp_connectx function among others
     
    5976                FIND_PACKAGE(SCTP REQUIRED)
    6077                INCLUDE_DIRECTORIES(${SCTP_INCLUDE_DIRS})
    61                 SET(FD_LIBS ${FD_LIBS} ${SCTP_LIBRARIES})
    6278        ENDIF(NOT HAVE_NATIVE_SCTP)
    6379        # Now check the number of args of this function, since it changed between Ubuntu 9.04 and 9.10
     
    7591ENDIF(NOT DISABLE_SCTP)
    7692
    77 # Check byte ordering
    78 TEST_BIG_ENDIAN(HOST_BIG_ENDIAN)
    7993
    80 # We need the getopt_long function
    81 CHECK_FUNCTION_EXISTS (getopt_long HAVE_LONG_OPTIONS)
    82 IF (NOT HAVE_LONG_OPTIONS)
    83    MESSAGE(SEND_ERROR "The getopt_long function is not found, please add needed library in build system")
    84 ENDIF (NOT HAVE_LONG_OPTIONS)
    85 
    86 # Check if ntohll is provided on the system
    87 CHECK_SYMBOL_EXISTS(ntohll "" HAVE_NTOHLL)
    88 
    89 # malloc.h ?
    90 CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
     94# FD_LIBS = libraries required by the daemon
     95SET(FD_LIBS ${CMAKE_DL_LIBS} ${SCTP_LIBRARIES})
    9196
    9297##########################
     
    100105
    101106# Save some variables for the other directories
    102 SET(FD_LIBS ${FD_LIBS} PARENT_SCOPE)
     107SET(FD_LIBS  ${FD_LIBS}  PARENT_SCOPE)
     108SET(LFD_LIBS ${LFD_LIBS} PARENT_SCOPE)
    103109
    104110####
  • libfreeDiameter/CMakeLists.txt

    r313 r316  
    2424
    2525# The library itself needs other libraries
    26 TARGET_LINK_LIBRARIES(libfreeDiameter ${FD_LIBS})
     26TARGET_LINK_LIBRARIES(libfreeDiameter ${LFD_LIBS})
    2727
    2828# Save the list of files for testcases in the daemon's directory
Note: See TracChangeset for help on using the changeset viewer.