Navigation


Changeset 320:53f912ce0f4e in freeDiameter


Ignore:
Timestamp:
May 19, 2010, 3:09:27 PM (12 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Add shared object version information

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r313 r320  
    77SET(FD_PROJECT_NAME freeDiameter)
    88SET(FD_PROJECT_BINARY freeDiameterd)
     9SET(FD_PROJECT_COPYRIGHT "Copyright (c) 2008-2009, WIDE Project (www.wide.ad.jp) and NICT (www.nict.go.jp)")
     10
     11# Version of the source code
    912SET(FD_PROJECT_VERSION_MAJOR 1)
    1013SET(FD_PROJECT_VERSION_MINOR 0)
    1114SET(FD_PROJECT_VERSION_REV 0)
    12 SET(FD_PROJECT_COPYRIGHT "Copyright (c) 2008-2009, WIDE Project (www.wide.ad.jp) and NICT (www.nict.go.jp)")
     15
     16# Version of the API with the library
     17SET(FD_PROJECT_VERSION_API 1)
    1318
    1419# Some subfolders may have tests
  • INSTALL.Ubuntu

    r319 r320  
    5555===========================================
    5656
    57 You can alternatively do:
     57# You can alternatively do:
    5858apt-get -y install mercurial cmake make gcc bison flex libsctp-dev libgnutls-dev libgcrypt-dev libpq-dev ssl-cert debhelper
    5959cd /usr/src
  • freeDiameter/CMakeLists.txt

    r316 r320  
    4343                fdd.tab.h
    4444        )
     45       
     46# Save the list of files for the tests
     47SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE)
     48SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE)
     49
    4550
    4651# Require GNU TLS for building the daemon
     
    5560INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR})
    5661
    57 # Building the executable
     62
     63# Build the executable
    5864ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} ${FD_COMMON_GEN_SRC} main.c)
     65
     66# The version
     67SET_TARGET_PROPERTIES(freeDiameterd PROPERTIES
     68        VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV})
    5969
    6070# Add this to workaround an apparent bug in FreeBSD cmake (already defined in Linux)
     
    6474LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter)
    6575TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS})
    66 
    67 # Save the list of files, if needed
    68 SET(FD_COMMON_SRC ${FD_COMMON_SRC} PARENT_SCOPE)
    69 SET(FD_COMMON_GEN_SRC ${FD_COMMON_GEN_SRC} PARENT_SCOPE)
    7076
    7177# The unary tests directory
  • include/freeDiameter/freeDiameter-host.h.in

    r304 r320  
    6666# define FD_PROJECT_VERSION_REV 0
    6767#endif /*FD_PROJECT_VERSION_REV*/
    68 /* HG_VERSION */
    69 /* PACKAGE_HG_REVISION */
     68#cmakedefine FD_PROJECT_VERSION_API   @FD_PROJECT_VERSION_API@
     69#ifndef FD_PROJECT_VERSION_API
     70# define FD_PROJECT_VERSION_API 0
     71#endif /*FD_PROJECT_VERSION_API*/
    7072#cmakedefine FD_PROJECT_COPYRIGHT "@FD_PROJECT_COPYRIGHT@"
    7173
  • include/freeDiameter/libfreeDiameter.h

    r304 r320  
    3939 * It provides the tools to manipulate Diameter messages and related data.
    4040 * This file should always be included as #include <freeDiameter/libfreeDiameter.h>
     41 *
     42 * If any change is made to this file, you must increment the FD_PROJECT_VERSION_API version.
    4143 *
    4244 * The file contains the following parts:
  • libfreeDiameter/CMakeLists.txt

    r316 r320  
    1717        )
    1818
     19# Save the list of files for testcases in the daemon's directory
     20SET(LFD_SRC ${LFD_SRC} PARENT_SCOPE)
     21
    1922# Build as a shared library
    2023ADD_LIBRARY(libfreeDiameter SHARED ${LFD_SRC})
    2124
    22 # Avoid the liblib name
    23 SET_TARGET_PROPERTIES(libfreeDiameter PROPERTIES OUTPUT_NAME "freeDiameter")
     25# Avoid the liblib name, and set the version
     26SET_TARGET_PROPERTIES(libfreeDiameter PROPERTIES
     27        OUTPUT_NAME "freeDiameter"
     28        SOVERSION ${FD_PROJECT_VERSION_API}
     29        VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV})
    2430
    2531# The library itself needs other libraries
    2632TARGET_LINK_LIBRARIES(libfreeDiameter ${LFD_LIBS})
    27 
    28 # Save the list of files for testcases in the daemon's directory
    29 SET(LFD_SRC ${LFD_SRC} PARENT_SCOPE)
    3033
    3134
Note: See TracChangeset for help on using the changeset viewer.