obconf-qt-packaging/CMakeLists.txt
Alf Gaida b19c4f5c58 Cherry-picking upstream version 0.10.96~25-gbc999b9.
Preparing the upcoming release, switch to experimental
Added new build dependendies:
 - gcc (>= 4:6)
 - g++ (>= 4:6)
 - libkf5windowsystem-dev,
 - liblxqt0-dev (>= 0.10.96~),
 - libqt5xdg-dev (>= 1.3.1~),
Bumped Standards to 3.9.8, no changes needed
Fixed VCS fields, using plain /git/
Added Recommends obconf-qt-l10n
Used GPL-2+ for debian, no need to introduce a second license
Fixed copyrights Format field to https
Dropped patches, applied upstream
Added translation control to rules
Set CMAKE_BUILD_TYPE=RelWithDebInfo
Exported LC_ALL=C.UTF-8, make builds reproducible
Cleaned up source/options and .gitignore
2016-07-19 22:12:51 +02:00

67 lines
1.9 KiB
CMake

project(obconf-qt)
# newer cmake is required for CMAKE_AUTOMOC Qt support
cmake_minimum_required(VERSION 2.8.6)
find_program(SED_PROGRAM sed)
# additional cmake files
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(GNUInstallDirs)
# Support Qt4 for the time being
option(USE_QT4 "Build with Qt4." $ENV{USE_QT4})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_AUTOMOC ON)
if(USE_QT4)
find_package(Qt4 REQUIRED QtCore QtGui) # Qt
include(${QT_USE_FILE})
message(STATUS "Building with Qt${QTVERSION}")
else()
cmake_minimum_required(VERSION 2.8.11)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5X11Extras REQUIRED)
find_package(Qt5LinguistTools REQUIRED QUIET)
message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}")
endif()
#Note: no run-time dependency on liblxqt, just a build dependency for lxqt_translate_ts/desktop
find_package(lxqt REQUIRED)
find_package(PkgConfig)
pkg_check_modules(GLIB REQUIRED
glib-2.0
)
pkg_check_modules(OPENBOX REQUIRED
obrender-3.5
obt-3.5
)
# add src subdirectory
add_subdirectory(src)
# install an icon for the application
install(
FILES data/obconf-qt.png
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps"
)
# building tarball with CPack -------------------------------------------------
# To create a source distribution, type:
# make package_source
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set (CPACK_PACKAGE_VENDOR "")
set (CPACK_PACKAGE_VERSION_MAJOR "0")
set (CPACK_PACKAGE_VERSION_MINOR "1")
set (CPACK_PACKAGE_VERSION_PATCH "0")
set (CPACK_GENERATOR TBZ2)
set (CPACK_SOURCE_GENERATOR TBZ2)
set (CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
# set (CPACK_SOURCE_PACKAGE_FILE_NAME pcmanfm-qt.0.1.0.tar.gz)
include (CPack)