KDE version string not in build system available
Ralf Habacker
ralf.habacker at freenet.de
Wed Jun 20 09:50:39 CEST 2007
Hi,
for win32 packaging of kdelibs I need the recent KDE version string in
the build system which is only available at c++ level yet provided by
the file kdecore/util/kdeversion.h which defines some VERSION macros
#define KDE_VERSION_STRING "3.90.1 (KDE 4.0 >= 20070518)"
/// @brief Major version of KDE, at compile time
#define KDE_VERSION_MAJOR 3
/// @brief Minor version of KDE, at compile time
#define KDE_VERSION_MINOR 90
/// @brief Release version of KDE, at compile time
#define KDE_VERSION_RELEASE 1
If there are no objectivities I would place this into the top level
CMakeLists.txt and generate kdeversion.h in top level build root from it
according the followin cmake code snippets
CMakeLists.txt
project(kdelibs)
set (KDE_VERSION_MAJOR 3)
set (KDE_VERSION_MINOR 90)
set (KDE_VERSION_RELEASE 1)
set (KDE_VERSION
"${KDE_VERSION_MAJOR}.${KDE_VERSION_MINOR}.${KDE_VERSION_RELEASE}" )
set (KDE_VERSION_STRING "${KDE_VERSION} (KDE 4.0 >= 20070518)")
kdecore/CMakeLists.txt
...
# Generate kdeversion.h
configure_file(util/kdeversion.h.cmake ${CMAKE_BINARY_DIR}/kdeversion.h )
...
kdeversion.h.cmake
#cmakedefine KDE_VERSION_STRING "@KDE_VERSION_STRING@"
/// @brief Major version of KDE, at compile time
#define KDE_VERSION_MAJOR @KDE_VERSION_MAJOR@
/// @brief Minor version of KDE, at compile time
#define KDE_VERSION_MINOR @KDE_VERSION_MINOR@
/// @brief Release version of KDE, at compile time
#define KDE_VERSION_RELEASE @KDE_VERSION_RELEASE@
Ralf
More information about the Kde-buildsystem
mailing list