Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | ) | 45 | ) | ||
46 | 46 | | |||
47 | find_package(LibKWorkspace ${PROJECT_VERSION} REQUIRED) | 47 | find_package(LibKWorkspace ${PROJECT_VERSION} REQUIRED) | ||
48 | 48 | | |||
49 | find_package(UDev REQUIRED) | 49 | find_package(UDev REQUIRED) | ||
50 | 50 | | |||
51 | find_package(XCB REQUIRED COMPONENTS XCB RANDR DPMS) | 51 | find_package(XCB REQUIRED COMPONENTS XCB RANDR DPMS) | ||
52 | 52 | | |||
53 | option(WITH_DDCUTIL "DDCUtil library support" OFF) | 53 | option(HAVE_DDCUTIL "DDCUtil library support" OFF) | ||
broulik: we typically use `HAVE_xxx` but fine with me | |||||
54 | if(WITH_DDCUTIL) | 54 | if(HAVE_DDCUTIL) | ||
55 | find_package(DDCUtil REQUIRED) | 55 | find_package(DDCUtil REQUIRED) | ||
56 | add_compile_definitions(WITH_DDCUTIL) | ||||
56 | set_package_properties(DDCUtil | 57 | set_package_properties(DDCUtil | ||
57 | PROPERTIES DESCRIPTION "DDCUtil library support" | 58 | PROPERTIES DESCRIPTION "DDCUtil library support" | ||
58 | TYPE OPTIONAL | 59 | TYPE OPTIONAL | ||
59 | PURPOSE "Set monitor settings over DDC/CI channel" | 60 | PURPOSE "Set monitor settings over DDC/CI channel" | ||
60 | ) | 61 | ) | ||
61 | else() | 62 | else() | ||
62 | add_feature_info("DDCUtil" "Off" "DDCUtil library support is disabled by default as recomemded by authors, add -DWITH_DDCUTIL=On to enable") | 63 | add_feature_info("DDCUtil" HAVE_DDCUTIL "DDCUtil library support is disabled by default as recomended by authors, add -DHAVE_DDCUTIL=On to enable") | ||
63 | endif() | 64 | endif() | ||
64 | 65 | | |||
65 | include_directories ( | 66 | include_directories ( | ||
66 | ${CMAKE_CURRENT_BINARY_DIR} | 67 | ${CMAKE_CURRENT_BINARY_DIR} | ||
67 | ${CMAKE_CURRENT_SOURCE_DIR}/daemon | 68 | ${CMAKE_CURRENT_SOURCE_DIR}/daemon | ||
68 | ) | 69 | ) | ||
69 | 70 | | |||
70 | add_definitions(-DQT_NO_KEYWORDS) | 71 | add_definitions(-DQT_NO_KEYWORDS) | ||
71 | 72 | | |||
72 | add_subdirectory(daemon) | 73 | add_subdirectory(daemon) | ||
73 | add_subdirectory(kcmodule) | 74 | add_subdirectory(kcmodule) | ||
74 | add_subdirectory(doc) | 75 | add_subdirectory(doc) | ||
75 | 76 | | |||
76 | install( FILES powerdevil.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} ) | 77 | install( FILES powerdevil.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} ) | ||
broulik: Stray whitespace | |||||
77 | 78 | | |||
78 | feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) | 79 | feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) |
we typically use HAVE_xxx but fine with me