plasma: create version header at build time

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2015-11-09 09:28:25 +02:00
parent 60dc63b20f
commit 74984eae6a
2 changed files with 12 additions and 5 deletions

View file

@ -42,9 +42,16 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/config-plasma.h
)
configure_file(
version.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/version.h
@ONLY
)
if(ENABLE_TESTING)
add_subdirectory(tests)
endif()
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1209)
########### next target ###############
@ -266,7 +273,7 @@ install(
theme.h
tooltipcontent.h
tooltipmanager.h
version.h
${CMAKE_CURRENT_BINARY_DIR}/version.h
view.h
wallpaper.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma

View file

@ -28,14 +28,14 @@
* String version of libplasma version, suitable for use in
* file formats or network protocols
*/
#define PLASMA_VERSION_STRING "4.17.0"
#define PLASMA_VERSION_STRING "@KDE_VERSION@"
/// @brief Major version of libplasma, at compile time
#define PLASMA_VERSION_MAJOR 4
#define PLASMA_VERSION_MAJOR @KDE_VERSION_MAJOR@
/// @brief Minor version of libplasma, at compile time
#define PLASMA_VERSION_MINOR 17
#define PLASMA_VERSION_MINOR @KDE_VERSION_MINOR@
/// @brief Release version of libplasma, at compile time
#define PLASMA_VERSION_RELEASE 0
#define PLASMA_VERSION_RELEASE @KDE_VERSION_RELEASE@
#define PLASMA_MAKE_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))