Skip to content

Commit

Permalink
Merge pull request #1 from kkaempf/master
Browse files Browse the repository at this point in the history
Make cmake infrastructure similar to libyui
  • Loading branch information
tgoettlicher committed Jun 12, 2012
2 parents c9db7bf + 562666b commit 82fef27
Show file tree
Hide file tree
Showing 102 changed files with 1,883 additions and 679 deletions.
110 changes: 110 additions & 0 deletions .gitignore
@@ -0,0 +1,110 @@
# GNU Autotools
Makefile.in
/autom4te.cache
/aclocal.m4
/compile
/configure
/depcomp
/install-sh
/missing

# Object files
*.o

# Libraries
*.lib

# Shared objects (inc. Windows DLLs)
*.dll
*.so

# Executables
*.exe
*.out

# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so
*.so.*

# Compiled Static libraries
*.lai
*.la
*.a

# CMake
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt

# CMake project-bindir
build*/

# Archives
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.bzip
*.bz2
*.xz
*.lzma

# packing-only formats
*.iso
*.tar

# package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm

# CVS
/CVS/*
*/CVS/*
.cvsignore
*/.cvsignore*~
\#*\#

# Emacs
/.emacs.desktop
/.emacs.desktop.lock
.elc
auto-save-list
tramp
.\#*

# Emacs Org-mode
.org-id-locations

# Unix/Linux
*_archive
.*
!.gitignore
*~
*.bak
*.log
*.old
*swp
tmp

# KDE
.directory

# Subversion
.svn/

# OBS commit
package/
57 changes: 29 additions & 28 deletions CMakeLists.txt
@@ -1,28 +1,29 @@
# cmake 2.6 requires this
cmake_minimum_required(VERSION 2.4)

PROJECT(yast2-qt)
SET( CMAKE_INSTALL_PREFIX "/usr" )
SET( LIBYUI_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/yui" )
SET( CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/cmake/Modules" ${CMAKE_MODULE_PATH} )

SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Woverloaded-virtual -Wno-deprecated" )
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DQT_NO_DEBUG -DNDEBUG")

SET( RPMNAME "yast2-qt" )

FIND_PACKAGE(Qt4 REQUIRED)
FIND_PACKAGE(Libyui REQUIRED)
SET(CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/YaST2/data/devtools/cmake/modules" ${CMAKE_MODULE_PATH})
SET(YAST_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include/YaST2)

SET(Y2QT_ICONDIR ${CMAKE_INSTALL_PREFIX}/share/YaST2/theme/current)
SET(Y2QT_LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/YaST2/locale)
SET(Y2QT_THEMEDIR ${CMAKE_INSTALL_PREFIX}/share/YaST2/theme)

GENERATE_PACKAGING(${RPMNAME} ${VERSION})

ADD_SUBDIRECTORY(src)


CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/macros.cmake )
INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/PROJECTINFO.cmake )
INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/RPMINFO.cmake )
INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/VERSION.cmake )

INITIALIZE()

PROJECT( ${PROJECTNAME} )

SET_OPTIONS()
SET_ENVIRONMENT()
SET_BUILD_FLAGS()
SET_AUTODOCS()

IF( NOT DOCS_ONLY )
FIND_LIB_DEPENDENCIES()
FIND_LINKER_LIBS()
CHECK_PREFIX()
SET_SUBDIRS()
GEN_EXPORTS()
GEN_FILES()
PREP_SPEC_FILES()
SET_INSTALL_TARGET()
PREP_OBS_TARBALL()
ENDIF( NOT DOCS_ONLY )

SUMMARY()
File renamed without changes.
12 changes: 12 additions & 0 deletions PROJECTINFO.cmake
@@ -0,0 +1,12 @@
##### PROJECTINFO for CMake

SET( BASELIB "yui" ) # don't change this

##### MAKE ALL NEEDED CHANGES HERE #####

SET( SUBDIRS src ) # set the subdirs where your code is located.
SET( PLUGINNAME "qt" ) # define the your plugin's name, e.g. {gtk, ncurses-pkg, qt-graph}
SET( LIB_DEPS Qt ) # define the plugin's dependecies CMake should look for separated with spaces; libyui-internal deps go in the next line
SET( INTERNAL_DEPS ) # include libyui or it's plugins (if needed), too!
SET( LIB_LINKER X11 dl pthread )# define the libs to link against with their -l name for separated with spaces, e.g. pthread dl; include libyui or it's plugins (if needed), too!
SET( PROGSUBDIR "" ) # define your programm's name if the plugin is made for it, only. e.g. "YaST2" for {gtk,ncurses,qt}-pkg.
20 changes: 20 additions & 0 deletions RPMINFO.cmake
@@ -0,0 +1,20 @@
##### RPMINFO for CMake
#####
##### THIS IS THE INFO REQUIRED FOR SPEC-FILE GENERATION

SET( SPEC_URL "http://github.com/libyui/libyui-qt/" ) # the URL of the project

SET( SPEC_SUMMARY "Qt frontend for libyui" ) # some brief summary

SET( SPEC_DESCRIPTION "This is the user interface frontend that provides Qt UI for libyui\n" ) # the description to be used, end each line with "\n" for line-breaks

SET( SPEC_BuildRequires "libyui-devel >= 2.21.5" "libqt4-devel" "cmake >= 2.8" "gcc-c++" ) # the BuildRequires every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Provides "py2qt = %{version}" ) # the Provides every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Obsoletes "py2qt < %{version}" ) # the Obsoletes every single pkg wrapped with "" and speparated with spaces

SET( SPEC_DEVEL_Requires "@PROJECTNAME@@@varpfx@_SONAME_MAJOR@ = %{version}" ) # the Requires for the -devel pkg every single pkg wrapped with "" and speparated with spaces
SET( SPEC_DEVEL_Requires ${SPEC_DEVEL_Requires} "glibc-devel" "libstdc++-devel" )

SET( SPEC_DEVEL_Provides "pkgconfig(@PROJECTNAME@) = %{version}" ) # the Provides for the -devel pkg
6 changes: 6 additions & 0 deletions VERSION.cmake
@@ -1,3 +1,9 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "22")
SET(VERSION_PATCH "6")
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )

SET( SONAME_MAJOR "4" )
SET( SONAME_MINOR "0" )
SET( SONAME_PATCH "0" )
SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" )
5 changes: 5 additions & 0 deletions libyui-qt-doc.changes
@@ -0,0 +1,5 @@
-------------------------------------------------------------------
Mon Jun 11 12:39:14 UTC 2012 - kkaempf@suse.com

- New package

93 changes: 0 additions & 93 deletions libyui-qt.spec.in

This file was deleted.

0 comments on commit 82fef27

Please sign in to comment.