aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-06-10 23:04:52 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-06-10 23:04:52 -0500
commit3f7fad001e4fe74a89b60d2e217750baaf3b0392 (patch)
tree0815572c8e67e0920e08b3f98277fab30a19b380 /CMakeLists.txt
parent49772635dc8dddeaea5a8f209bd7aac030a8a132 (diff)
downloadayatana-indicator-datetime-3f7fad001e4fe74a89b60d2e217750baaf3b0392.tar.gz
ayatana-indicator-datetime-3f7fad001e4fe74a89b60d2e217750baaf3b0392.tar.bz2
ayatana-indicator-datetime-3f7fad001e4fe74a89b60d2e217750baaf3b0392.zip
Don't build the hw-alarms pieces if ubuntu/hardware/alarm.h can't be found. Don't require libplatform-hardware-api-* unless the arch is armhf, i386, or amd64.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e068f4..1390f44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,7 @@ set (CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_
##
find_package (PkgConfig REQUIRED)
+include (CheckIncludeFile)
include (FindPkgConfig)
pkg_check_modules (SERVICE_DEPS REQUIRED
@@ -42,7 +43,12 @@ pkg_check_modules (SERVICE_DEPS REQUIRED
url-dispatcher-1>=1
properties-cpp>=0.0.1)
include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS})
-set (SERVICE_DEPS_LIBRARIES -lubuntu_platform_hardware_api ${SERVICE_DEPS_LIBRARIES})
+
+CHECK_INCLUDE_FILE(ubuntu/hardware/alarm.h HAVE_UBUNTU_HW_ALARM_H)
+if (HAVE_UBUNTU_HW_ALARM_H)
+ set (SERVICE_DEPS_LIBRARIES -lubuntu_platform_hardware_api ${SERVICE_DEPS_LIBRARIES})
+ add_definitions(-DHAVE_UBUNTU_HW_ALARM_H)
+endif ()
##
## custom targets