Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
first version of the buildtools
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Esser committed Jun 11, 2012
1 parent 11ac2db commit 320bc18
Show file tree
Hide file tree
Showing 18 changed files with 1,209 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -3,11 +3,10 @@

# but these
!CMakeLists.txt
!*.in
!INSTALL
!INSTRUCTIONS
!macros.cmake
!MAINTAINER
!Makefile.cvs
!README*
!*.yui-skel
!*.skel
29 changes: 29 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,29 @@
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()
1 change: 1 addition & 0 deletions MAINTAINER
@@ -0,0 +1 @@
Björn Esser <bjoern.esser@gmail.com>
21 changes: 21 additions & 0 deletions Makefile.cvs
@@ -0,0 +1,21 @@
#
# Makefile.cvs
#

all: configure

configure: clean
mkdir build ; \
cd build ; \
cmake -DCMAKE_BUILD_TYPE=RELEASE ..

install: configure
cd build ; \
make && make install

reconf:
cd build ; \
cmake rebuild_cache

clean:
rm -rf build
12 changes: 12 additions & 0 deletions PROJECTINFO.skel
@@ -0,0 +1,12 @@
##### PROJECTINFO for CMake

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

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

SET( SUBDIRS src examples ) # set the subdirs where your code is located.
SET( PLUGINNAME "" ) # define the your plugin's name, e.g. {gtk, ncurses-pkg, qt-graph}
SET( LIB_DEPS ) # 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 ) # 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.
21 changes: 21 additions & 0 deletions RPMINFO.skel
@@ -0,0 +1,21 @@
##### RPMINFO for CMake
#####
##### THIS IS THE INFO REQUIRED FOR SPEC-FILE GENERATION

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

SET( SPEC_SUMMARY "" ) # some brief summary

SET( SPEC_DESCRIPTION "\n" ) # the description to be used, end each line with "\n" for line-breaks

SET( SPEC_BuildRequires "cmake >= 2.8" ) # the BuildRequires every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Conflicts "" ) # the Conflicts every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Provides "" ) # the Provides every single pkg wrapped with "" and speparated with spaces

SET( SPEC_Obsoletes "" ) # 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_Provides "pkgconfig(@PROJECTNAME@) = %{version}" ) # the Provides for the -devel pkg
9 changes: 9 additions & 0 deletions VERSION.skel
@@ -0,0 +1,9 @@
SET( VERSION_MAJOR "0" )
SET( VERSION_MINOR "0" )
SET( VERSION_PATCH "0" )
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}" )
17 changes: 17 additions & 0 deletions examples/CMakeLists.txt
@@ -0,0 +1,17 @@
INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/src" )

SET( EXAMPLES_LIST
##### Here go the examples
)

FOREACH( EXAMPLE ${EXAMPLES_LIST} )
IF( ENABLE_EXAMPLES )
ADD_EXECUTABLE ( ${EXAMPLE} ${EXAMPLE}.cc )
TARGET_LINK_LIBRARIES( ${EXAMPLE} ${TARGETLIB} )
ENDIF( ENABLE_EXAMPLES )

INSTALL(
FILES "${EXAMPLE}.cc"
DESTINATION "${INSTALL_DOC_DIR_PREFIX}/examples"
)
ENDFOREACH( EXAMPLE ${EXAMPLES_LIST} )

0 comments on commit 320bc18

Please sign in to comment.