-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migration to new CMake build environment
- Loading branch information
1 parent
2a33a8d
commit e3f80b6
Showing
15 changed files
with
476 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 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.10 ) | ||
project( libyui-qt ) | ||
|
||
# Options usage: | ||
# | ||
# cmake -DBUILD_DOC=on -DBUILD_EXAMPLES=off .. | ||
|
||
option( BUILD_SRC "Build in src/ subdirectory" on ) | ||
option( BUILD_DOC "Build class documentation" off ) | ||
option( WERROR "Treat all compiler warnings as errors" on ) | ||
|
||
# Non-boolean options | ||
set( DOC_DESTDIR "" CACHE STRING "Destination directory prefix for installing docs" ) | ||
|
||
#---------------------------------------------------------------------- | ||
|
||
|
||
# As of now, no support for /usr/local instead of /usr. But CMake DESTDIR works. | ||
set( CMAKE_INSTALL_PREFIX /usr ) | ||
|
||
|
||
# Initialize compiler flags for all targets in all subdirectories | ||
add_compile_options( "-Wall" ) | ||
add_compile_options( "-Os" ) # Optimize for size (overrides CMake's -O3 in RELEASE builds) | ||
|
||
if ( WERROR ) | ||
add_compile_options( "-Werror" ) | ||
endif() | ||
|
||
|
||
# | ||
# Descend into subdirectories | ||
# | ||
|
||
if ( BUILD_SRC ) | ||
add_subdirectory( src ) | ||
endif() | ||
|
||
if ( BUILD_DOC ) | ||
add_subdirectory( doc ) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# Makefile.repo for libyui-qt-pkg | ||
# | ||
|
||
# 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 .. | ||
|
||
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.