Skip to content

Commit

Permalink
Merge pull request #79 from libyui/NewLibyuiTree
Browse files Browse the repository at this point in the history
New libyui tree
  • Loading branch information
shundhammer authored Jun 19, 2021
2 parents 7ea8762 + 5e1757e commit ac3256a
Show file tree
Hide file tree
Showing 112 changed files with 649 additions and 2,449 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Makefile.in
# CMake
CMakeCache.txt
CMakeFiles
CMakeLists.txt
Makefile
cmake_install.cmake
install_manifest.txt
Expand Down
63 changes: 63 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# CMakeLists.txt for libyui-qt
#
# Usage:
#
# mkdir build
# cd build
# cmake ..
#
# make
# sudo make install
#
# Restart with a clean build environment:
# rm -rf build
#
# Show the complete compiler commands with all arguments:
# make VERBOSE=1

cmake_minimum_required( VERSION 3.17 )
project( libyui-gtk )

# Options usage:
#
# cmake -DBUILD_DOC=on -DBUILD_EXAMPLES=off ..

option( BUILD_SRC "Build in src/ subdirectory" on )
option( BUILD_PKGCONFIG "Build pkg-config support files" on )
option( BUILD_DOC "Build class documentation" off )
option( WERROR "Treat all compiler warnings as errors" off )

# Non-boolean options
set( DOC_DESTDIR "" CACHE STRING "Destination directory prefix for installing docs" )

#----------------------------------------------------------------------


set( CMAKE_INSTALL_MESSAGE LAZY ) # Suppress "up-to-date" messages during "make install"

add_compile_options( "-Wall" )
IF (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
# Initialize compiler flags for all targets in all subdirectories
add_compile_options( "-Os" ) # Optimize for size (overrides CMake's -O3 in RELEASE builds)
endif()

if ( WERROR )
add_compile_options( "-Werror" )
endif()


#
# Descend into subdirectories
#

if ( BUILD_SRC )
add_subdirectory( src )
endif()

if ( BUILD_PKGCONFIG )
add_subdirectory( pkgconfig )
endif()

if ( BUILD_DOC )
add_subdirectory( doc )
endif()
25 changes: 0 additions & 25 deletions Makefile.cvs

This file was deleted.

63 changes: 63 additions & 0 deletions Makefile.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# Makefile.repo for libyui-gtk
#

# Local Variables:
# mode: Makefile
# End:


all: clean configure build-hint

build-hint:
@echo ""
@echo "To build:"
@echo ""
@echo " cd build"
@echo " make"
@echo ""

configure:
mkdir build; \
cd build; \
cmake -DCMAKE_INSTALL_PREFIX=/usr ..

build: clean configure
cd build; \
make -j $$(nproc)

# This needs root privileges, of course
install: configure
cd build; \
make -j $$(nproc) && make install

clean:
rm -rf build

package:
rake package

doc:
test -d build || mkdir build
cd build; \
cmake -DBUILD_DOC=on .. ; \
make doc

install-doc: doc
cd build; \
make install-doc

version-bump:
rake version:bump

# Just an alias
bump-version: version-bump


# Enforce rebuilding some targets unconditionally, even if a file or directory
# with that name exists; otherwise the timestamp of that file or directory
# would be checked.
#
# We need this because we have a subdirectory doc/, a subdirectory package/
# and possibly a subdirectory build/ here.
.PHONY: doc package build
17 changes: 0 additions & 17 deletions PROJECTINFO.cmake

This file was deleted.

68 changes: 0 additions & 68 deletions SOURCECONF.cmake

This file was deleted.

8 changes: 1 addition & 7 deletions VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "51" )
SET( VERSION_MINOR "52" )
SET( VERSION_PATCH "0" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SHA1}" )

##### This is need for the libyui core, ONLY.
##### These will be overridden from exports in LibyuiConfig.cmake
SET( SONAME_MAJOR "0" )
SET( SONAME_MINOR "0" )
SET( SONAME_PATCH "0" )
SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" )
26 changes: 0 additions & 26 deletions bootstrap.sh

This file was deleted.

24 changes: 24 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# CMakeLists.txt for libyui*/doc

include( ../VERSION.cmake )

find_package( Doxygen REQUIRED dot )


#
# Doxygen-generated autodocs
#

if ( DOXYGEN_FOUND )

set( DOXYGEN_GENERATE_TREEVIEW yes ) # Enable views tree HTML frame
set( DOXYGEN_QUIET yes ) # Less verbose output
set( DOXYGEN_WARN_LOGFILE doxygen-warnings.log )
# See build/CMakeDoxyfile.in for more supported variables

doxygen_add_docs( doc ../src )

else()
message( WARNING "Missing doxygen package" )
endif()

38 changes: 38 additions & 0 deletions pkgconfig/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# CMakeLists.txt for libyui-gtk/pkgconfig
#
# Support for pkg-config:
#
# Generate a libyui-gtk.pc file from libyui-gtk.pc.in and install it to
# /usr/lib64/pkgconfig.
#
# A .pc file specifies how to use a development package, in particular linker
# flags (-lyui-gtk), compiler flags (including include directories) and paths.
# See man pkg-config.
#
# This .pc file is intended for extensions of the Gtk UI plug-in, not for
# applications using libyui.

include( ../VERSION.cmake )
include( GNUInstallDirs ) # set CMAKE_INSTALL_LIBDIR

FIND_PACKAGE(PkgConfig REQUIRED)

PKG_CHECK_MODULES(YUI REQUIRED libyui)
pkg_get_variable(YUI_SO_VERSION libyui soversion)
pkg_get_variable(YUI_SO_MAJOR libyui soversion_major)
pkg_get_variable(YUI_SO_MINOR libyui soversion_minor)
pkg_get_variable(YUI_SO_PATCH libyui soversion_patch)

##### This is needed to be set for the libyui core
SET( SONAME ${YUI_SO_VERSION} )
SET( SONAME_MAJOR ${YUI_SO_MAJOR} )
SET( SONAME_MINOR ${YUI_SO_MINOR} )
SET( SONAME_PATCH ${YUI_SO_PATCH} )

set( PKGCONFIG_INSTALL_DIR ${DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig )

# Generate libyui-gtk.pc where some CMake variables are expanded from libyui-gtk.pc.in,
# but only expand @VARIABLE@, not ${VARIABLE}
configure_file( libyui-gtk.pc.in libyui-gtk.pc @ONLY )

install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libyui-gtk.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
26 changes: 26 additions & 0 deletions pkgconfig/libyui-gtk.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Pkg-Config file for libyui-gtk
#
# Generated by CMake from libyui-gtk.pc.in
#

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}

datarootdir=${exec_prefix}/share
datadir=${datarootdir}/libyui
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${exec_prefix}/include
plugindir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@/yui

soversion_major=@SONAME_MAJOR@
soversion_minor=@SONAME_MINOR@
soversion_patch=@SONAME_PATCH@
soversion=@SONAME@

Name: libyui-gtk
Version: @VERSION@
Description: libyui-gtk - Gtk plugin for libyui GUI-abstraction library
Libs: -L${plugindir} -lyui-gtk
Libs.private: -ldl -lpthread
Cflags: -I${includedir}/yui/gtk -I${includedir}/yui -I${includedir}
Loading

0 comments on commit ac3256a

Please sign in to comment.