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 (75 lines) | stat: -rw-r--r-- 1,967 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
# $Id$
project(BASE_TRANSPARENCY)
set(BASE_TRANSPARENCY_VERSION_MAJOR 1)
set(BASE_TRANSPARENCY_VERSION_MINOR 0)
set(BASE_TRANSPARENCY_VERSION_PATCH 0)
set(BASE_TRANSPARENCY_VERSION ${BASE_TRANSPARENCY_VERSION_MAJOR}.${BASE_TRANSPARENCY_VERSION_MINOR}.${BASE_TRANSPARENCY_VERSION_PATCH})
set(BASE_TRANSPARENCY_SOVERSION ${BASE_TRANSPARENCY_VERSION_MAJOR}.${BASE_TRANSPARENCY_VERSION_MINOR})

########### Qt configuration #########
if(USE_QT5)

  find_package(Qt5Widgets REQUIRED)
  find_package(Qt5Network REQUIRED)

else()

  find_package(Qt4 REQUIRED)
  include(${QT_USE_FILE})
  add_definitions(${QT_DEFINITIONS})

endif()

# ########### X11 #######################
if(UNIX AND NOT APPLE)

  find_package(XCB COMPONENTS XCB SHAPE)
  if( XCB_XCB_FOUND AND XCB_SHAPE_FOUND )
    add_definitions(-DHAVE_XCB=1)
  else()
    add_definitions(-DHAVE_XCB=0)
  endif()

else()

  add_definitions(-DHAVE_XCB=0)

endif()

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

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

########### next target ###############
set(base_transparency_SOURCES
  CompositeEngine.cpp
  ShadowLabel.cpp
  TransparencyConfiguration.cpp
  TransparentWidget.cpp
)

if(ENABLE_SHARED)

  add_library(base-transparency SHARED ${base_transparency_SOURCES})
  set_target_properties(base-transparency PROPERTIES VERSION ${BASE_TRANSPARENCY_VERSION} SOVERSION ${BASE_TRANSPARENCY_SOVERSION})
  install(TARGETS base-transparency DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

else()

  add_library(base-transparency STATIC ${base_transparency_SOURCES})

endif()

target_link_libraries(base-transparency ${XCB_LIBRARIES})
target_link_libraries(base-transparency ${QT_LIBRARIES} base-qt)

if(USE_QT5)

  qt5_use_modules(base-transparency Widgets Network)

endif()