File: CMakeLists.txt

package info (click to toggle)
qtcurve 1.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 11,000 kB
  • sloc: cpp: 70,231; perl: 123; sh: 122; xml: 46; makefile: 14
file content (100 lines) | stat: -rw-r--r-- 3,030 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
if(QTC_QT5_ENABLE_QTQUICK2)
  set(QTC_QT5_MODULES Qt5Core Qt5Gui Qt5Widgets Qt5Svg Qt5Quick Qt5DBus)
else()
  set(QTC_QT5_MODULES Qt5Core Qt5Gui Qt5Widgets Qt5Svg Qt5DBus)
endif()
if(QTC_QT5_ENABLE_KDE)
  set(QTC_QT5_MODULES ${QTC_QT5_MODULES} Qt5PrintSupport)
endif()

if(ENABLE_QT5 AND NOT ENABLE_QT5_DEFINED)
  set(QT_MIN_VERSION "5.3.2")
  # ENABLE_QT5 is not defined on the command line
  foreach(QtModule ${QTC_QT5_MODULES})
    find_package(${QtModule} ${QT_MIN_VERSION} CONFIG)
    if(NOT ${QtModule}_FOUND)
      message(WARNING "Required Qt5 Module ${QtModule} not found."
        "Disabling Qt5 build")
      set(ENABLE_QT5 Off)
      set(ENABLE_QT5 Off PARENT_SCOPE)
      break()
    endif()
  endforeach()
endif()

add_definitions(-DQTC_UTILS_QT5 -DQTC_UTILS_QT)

set(QTC_QT5_ENABLE_KWIN Off)

if(ENABLE_QT5)
  set(QTC_QT5_LINK_LIBS)
  set(QTC_QT5_DEFS)
  set(QTC_QT5_INCLUDES)
  foreach(QtModule ${QTC_QT5_MODULES})
    find_package(${QtModule} REQUIRED)
    set(QTC_QT5_LINK_LIBS ${QTC_QT5_LINK_LIBS} ${${QtModule}_LIBRARIES})
    set(QTC_QT5_DEFS ${QTC_QT5_DEFS} ${${QtModule}_DEFINITIONS})
    set(QTC_QT5_INCLUDES ${QTC_QT5_INCLUDES} ${${QtModule}_INCLUDE_DIRS})
  endforeach()
  if(NOT APPLE)
    set(QTC_QT5_OPT_MODULES Qt5X11Extras)
  endif()
  foreach(QtModule ${QTC_QT5_OPT_MODULES})
    find_package(${QtModule})
    if(${QtModule}_FOUND)
      set(QTC_QT5_LINK_LIBS ${QTC_QT5_LINK_LIBS} ${${QtModule}_LIBRARIES})
      set(QTC_QT5_DEFS ${QTC_QT5_DEFS} ${${QtModule}_DEFINITIONS})
      set(QTC_QT5_INCLUDES ${QTC_QT5_INCLUDES} ${${QtModule}_INCLUDE_DIRS})
    endif()
  endforeach()
  get_target_property(REAL_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE}
    IMPORTED_LOCATION)
  execute_process(COMMAND "${REAL_QMAKE_EXECUTABLE}" -query QT_INSTALL_PLUGINS
    OUTPUT_VARIABLE _Qt5_PLUGIN_INSTALL_DIR
    ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
  set(QTCURVE_STYLE_DIR "${_Qt5_PLUGIN_INSTALL_DIR}/styles/")
  include_directories(
    "${CMAKE_CURRENT_SOURCE_DIR}"
    "${CMAKE_CURRENT_BINARY_DIR}")
  add_definitions(-DTRANSLATION_DOMAIN=\"qtcurve\" ${QTC_QT5_DEFS})
  include_directories(${QTC_QT5_INCLUDES})
  configure_file(config-qt5.h.in config-qt5.h @ONLY)

  if(QTC_QT5_ENABLE_KDE)
    find_package(ECM 1.2.0 REQUIRED NO_MODULE)
    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}
      ${ECM_KDE_MODULE_DIR})

    find_package(KF5 REQUIRED COMPONENTS
      Archive
      Config
      ConfigWidgets
      FrameworkIntegration
      I18n
      KDELibs4Support
      KIO
      GuiAddons
      IconThemes
      WidgetsAddons
      WindowSystem
      XmlGui)

    add_definitions(-DQTC_QT5_ENABLE_KDE)
    include(KDEInstallDirs)
    include(KDECMakeSettings)
    include(KDECompilerSettings)
    if(NOT APPLE)
        set(QTC_QT5_ENABLE_KWIN ON)
    endif()
  endif()
else()
  set(QTC_QT5_ENABLE_KDE Off)
endif()

add_subdirectory(common)
add_subdirectory(config)
if(QTC_QT5_ENABLE_KWIN)
    add_subdirectory(kwin)
    add_subdirectory(kwinconfig)
endif()
add_subdirectory(style)