Changeset 547 for trunk/CMakeLists.txt


Ignore:
Timestamp:
11/26/09 02:45:13 (14 years ago)
Author:
smurzch2
Message:

Add SVN version number in the log and the usage display.

So, we can see which version is used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r500 r547  
    179179endif (OSCamOperatingSystem MATCHES "Linux")
    180180
     181#----------------------- put svnversion in the build ------------------------------
     182# at every target rebuild, we re-build the oscam.c compilation...
     183
     184# add the needed dependency
     185add_dependencies (${exe_name} svnversion)
     186add_dependencies (${csoscam} svnversion-log)
     187
     188# how to re-build the files which printout the version
     189add_custom_target (
     190    svnversion
     191    ALL
     192    touch ${CMAKE_CURRENT_SOURCE_DIR}/oscam.c
     193)
     194add_custom_target (
     195    svnversion-log
     196    ALL
     197    touch ${CMAKE_CURRENT_SOURCE_DIR}/oscam-log.c
     198)
     199
     200# pass the version to the compilations as a define
     201add_definitions ("-D'CS_SVN_VERSION=\"$(shell svnversion -n ${CMAKE_CURRENT_SOURCE_DIR})\"'")
     202
    181203#----------------------- global compile and link options ------------------------------
    182204
Note: See TracChangeset for help on using the changeset viewer.