~ubuntu-branches/ubuntu/trusty/polkit-qt-1/trusty

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-13 09:08:07 UTC
  • Revision ID: james.westby@ubuntu.com-20091213090807-ibl3mdtee5964009
Tags: upstream-0.95.0~svn1057107
ImportĀ upstreamĀ versionĀ 0.95.0~svn1057107

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Polkit Qt Library
 
2
project("Polkit-qt-1")
 
3
 
 
4
cmake_minimum_required(VERSION 2.6.0)
 
5
 
 
6
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 
7
 
 
8
set(QT_MIN_VERSION "4.4.0")
 
9
 
 
10
find_package(Qt4 REQUIRED)
 
11
find_package(Automoc4 REQUIRED)
 
12
 
 
13
include (${QT_USE_FILE})
 
14
include (InstallSettings)
 
15
include (FindPkgConfig)
 
16
 
 
17
pkg_check_modules (POLKIT REQUIRED polkit-gobject-1>=0.95)
 
18
pkg_check_modules (POLKIT_AGENT REQUIRED polkit-agent-1>=0.95)
 
19
 
 
20
message(STATUS " ${POLKIT_INCLUDE_DIRS} ===========")
 
21
 
 
22
include_directories(
 
23
    ${CMAKE_CURRENT_BINARY_DIR}
 
24
    ${POLKIT_INCLUDE_DIRS}
 
25
    ${POLKITDBUS_INCLUDE_DIRS}
 
26
    ${CMAKE_CURRENT_SOURCE_DIR}
 
27
    ${CMAKE_CURRENT_SOURCE_DIR}/core
 
28
    ${CMAKE_CURRENT_SOURCE_DIR}/includes
 
29
    ${QT_QTXML_INCLUDE_DIR}
 
30
)
 
31
 
 
32
set(MAJOR_POLKIT_QT_VERSION "0")
 
33
set(MINOR_POLKIT_QT_VERSION "95")
 
34
set(PATCH_POLKIT_QT_VERSION "0")
 
35
set(POLKIT_QT_VERSION_STRING "${MAJOR_POLKIT_QT_VERSION}.${MINOR_POLKIT_QT_VERSION}.${PATCH_POLKIT_QT_VERSION}")
 
36
 
 
37
install(FILES
 
38
    gui/action.h
 
39
    gui/actionbutton.h
 
40
    gui/actionbuttons.h
 
41
 
 
42
    core/authority.h
 
43
    core/details.h
 
44
    core/identity.h
 
45
    core/subject.h
 
46
    core/temporaryauthorization.h
 
47
    core/actiondescription.h
 
48
    export.h
 
49
 
 
50
    includes/PolkitQt/Action
 
51
    includes/PolkitQt/Authority
 
52
    includes/PolkitQt/ActionButton
 
53
    includes/PolkitQt/ActionButtons
 
54
    includes/PolkitQt/Details
 
55
    includes/PolkitQt/Identity
 
56
    includes/PolkitQt/Subject
 
57
    includes/PolkitQt/TemporaryAuthorization
 
58
    includes/PolkitQt/ActionDescription
 
59
    DESTINATION
 
60
    ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitQt COMPONENT Devel)
 
61
 
 
62
install(FILES
 
63
    agent/listener.h
 
64
    agent/session.h
 
65
 
 
66
    export.h
 
67
 
 
68
    includes/PolkitQtAgent/Listener
 
69
    includes/PolkitQtAgent/Session
 
70
    DESTINATION
 
71
    ${INCLUDE_INSTALL_DIR}/polkit-qt-1/PolkitQtAgent COMPONENT Devel)
 
72
 
 
73
 
 
74
if(NOT WIN32)
 
75
# Pkgconfig
 
76
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-1.pc @ONLY)
 
77
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
 
78
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-core-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-core-1.pc @ONLY)
 
79
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-core-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
 
80
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-gui-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-gui-1.pc @ONLY)
 
81
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-gui-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
 
82
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/polkit-qt-agent-1.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-agent-1.pc @ONLY)
 
83
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/polkit-qt-agent-1.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
 
84
endif(NOT WIN32)
 
85
 
 
86
option(BUILD_EXAMPLES "Builds a set of examples for polkit-qt-1" OFF)
 
87
if (BUILD_EXAMPLES)
 
88
    add_subdirectory(examples)
 
89
endif (BUILD_EXAMPLES)
 
90
 
 
91
add_subdirectory(cmake)
 
92
 
 
93
option(BUILD_TEST "Builds unit tests for polkit-qt-1" OFF)
 
94
if (BUILD_TEST)
 
95
    add_subdirectory(test)
 
96
endif (BUILD_TEST)
 
97
 
 
98
add_subdirectory(core)
 
99
add_subdirectory(gui)
 
100
add_subdirectory(agent)
 
101