Skip to content

Commit

Permalink
fix undefined zypp version (bnc #811209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoettlicher committed Jul 4, 2013
1 parent 1a0926b commit e29403f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions PROJECTINFO.cmake
Expand Up @@ -15,3 +15,12 @@ SET( URL "http://github.com/libyui/" )
SET( SUMMARY "Libyui - Gtk Package Selector" )
SET( DESCRIPTION "This package contains the Gtk package selector\ncomponent for libYUI.\n" )


# set libzypp version
execute_process (COMMAND pkg-config --modversion libzypp COMMAND awk -F. "{ printf \"%d\", ($1 * 1000 + $2) * 1000 + $3;}" OUTPUT_VARIABLE ZYPP_VERSION)
if (NOT ZYPP_VERSION)
message (FATAL_ERROR "Could not parse Zypp version.")
endif (NOT ZYPP_VERSION)

# create config.h (see config.h.cmake)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
2 changes: 1 addition & 1 deletion SOURCECONF.cmake
Expand Up @@ -25,7 +25,7 @@ ygtkcellrenderertext.c
)

SET( ${TARGETLIB}_HEADERS
config.h
config.h.cmake
YGPackageSelector.h
YGPackageSelectorPluginImpl.h
ygtkcellrendererbutton.h
Expand Down
1 change: 0 additions & 1 deletion src/config.h

This file was deleted.

3 changes: 3 additions & 0 deletions src/config.h.cmake
@@ -0,0 +1,3 @@
#include <Libyui_config.h>

#cmakedefine ZYPP_VERSION ${ZYPP_VERSION}

0 comments on commit e29403f

Please sign in to comment.