File: CMakeLists.txt

package info (click to toggle)
qtop 2.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,840 kB
  • ctags: 5,775
  • sloc: cpp: 38,795; makefile: 9
file content (77 lines) | stat: -rw-r--r-- 1,841 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $Id$
project(BASE_NOTIFICATIONS)
set(BASE_NOTIFICATIONS_VERSION_MAJOR 1)
set(BASE_NOTIFICATIONS_VERSION_MINOR 0)
set(BASE_NOTIFICATIONS_VERSION_PATCH 0)
set(BASE_NOTIFICATIONS_VERSION ${BASE_NOTIFICATIONS_VERSION_MAJOR}.${BASE_NOTIFICATIONS_VERSION_MINOR}.${BASE_NOTIFICATIONS_VERSION_PATCH})
set(BASE_NOTIFICATIONS_SOVERSION ${BASE_NOTIFICATIONS_VERSION_MAJOR}.${BASE_NOTIFICATIONS_VERSION_MINOR})

########### Qt4 configuration #########
if(USE_QT5)

  find_package(Qt5Widgets REQUIRED)
  find_package(Qt5DBus)

else()

  find_package(Qt4 REQUIRED)

  if(UNIX AND NOT APPLE)

    set(QT_USE_QTDBUS TRUE)

  else()

    add_definitions("-DQT_NO_DBUS")

  endif()

  include(${QT_USE_FILE})
  add_definitions(${QT_DEFINITIONS})

endif()

########### includes ###############
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/base)
include_directories(${CMAKE_SOURCE_DIR}/base-qt)

########### links #########
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
link_directories(${CMAKE_INSTALL_PREFIX}/lib)

########### next target ###############
set(base_notifications_SOURCES
  ImageData.cpp
  SystemNotifications.cpp
  SystemNotifications_p.cpp
)

if(ENABLE_SHARED)

  add_library(base-notifications SHARED ${base_notifications_SOURCES})
  set_target_properties(base-notifications PROPERTIES VERSION ${BASE_NOTIFICATIONS_VERSION} SOVERSION ${BASE_NOTIFICATIONS_VERSION})
  install(TARGETS base-notifications DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

else()

  add_library(base-notifications STATIC ${base_notifications_SOURCES})

endif()

target_link_libraries(base-notifications ${QT_LIBRARIES} base base-qt)

if(USE_QT5)

  qt5_use_modules(base-notifications Widgets)
  if(Qt5DBus_FOUND )

    qt5_use_modules(base-notifications DBus)

  else()

    add_definitions("-DQT_NO_DBUS")

  endif()

endif()