You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
obconf-qt-packaging/CMakeLists.txt

61 lines
1.7 KiB

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)
# Support Qt5
option(USE_QT5 "Build with Qt5." $ENV{USE_QT5})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_AUTOMOC ON)
if(USE_QT5)
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}")
else()
find_package(Qt4 REQUIRED QtCore QtGui) # Qt
include(${QT_USE_FILE})
message(STATUS "Building with Qt${QTVERSION}")
endif()
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 share/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")
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)