Mercurial > hg > freeDiameter
view freeDiameter/CMakeLists.txt @ 33:e6fcdf12b9a0
Added a lot of TODOs :)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 29 Oct 2009 18:05:45 +0900 |
parents | 67ca08d5bc48 |
children | 0e2b57789361 |
line wrap: on
line source
# The subproject name Project("freeDiameterd" C) # Configuration parser BISON_FILE(fdd.y) FLEX_FILE(fdd.l) SET_SOURCE_FILES_PROPERTIES(lex.fdd.c fdd.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET(FD_COMMON_SRC fD.h cnxctx.h config.c cnxctx.c dispatch.c endpoints.c extensions.c dict_base_proto.c messages.c queues.c peers.c p_expiry.c p_out.c p_psm.c server.c tcp.c ) IF(NOT DISABLE_SCTP) SET(FD_COMMON_SRC ${FD_COMMON_SRC} sctp.c sctps.c) ENDIF(NOT DISABLE_SCTP) SET(FD_COMMON_GEN_SRC lex.fdd.c fdd.tab.c fdd.tab.h ) # Require GNU TLS for building the daemon FIND_PACKAGE(GNUTLS REQUIRED) INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIRS}) SET(FD_LIBS ${FD_LIBS} ${GNUTLS_LIBRARIES}) find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h) If ( NOT GCRYPT_INCLUDE_DIR ) MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent") Endif ( NOT GCRYPT_INCLUDE_DIR ) INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR}) # Building the executable ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c) # The link command LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter) TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS}) # Save the list of files, if needed SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE) SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE) # The unary tests directory OPTION(SKIP_TESTS "Skip compilation of the tests?" OFF) IF ( NOT SKIP_TESTS ) SUBDIRS(tests) ENDIF ( NOT SKIP_TESTS )