blob: 1905fc552ea18030eeb13f270553d0d2b7133ac1 (
plain)
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
|
From 91e150889814ddf97a75b881bb979c975894f34f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 10 Dec 2020 22:40:40 +0100
Subject: [PATCH] Check for dns_sd.h only when building GUI
The <dns_sd.h> header is only used in the synergy GUI component. Update
the CMake check to be done only if SYNERGY_BUILD_LEGACY_GUI is enabled.
This fixes build failures when GUI is not being built and <dns_sd.h>
is not installed.
While at it, fix indentation around the added check to match the rest
of the file and avoid being misleading.
---
CMakeLists.txt | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 581fdf77..35d806d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -235,11 +235,13 @@ if (UNIX)
list (APPEND libs Xi)
endif()
- set (DnsSdlib "dns_sd.h")
- set (CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};${DnsSdlib}")
- check_include_files ("${DnsSdlib}" HAVE_DNS_SD)
- if (NOT HAVE_DNS_SD)
- message (FATAL_ERROR "Missing header: " ${DnsSdlib})
+ if (SYNERGY_BUILD_LEGACY_GUI)
+ set (DnsSdlib "dns_sd.h")
+ set (CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_EXTRA_INCLUDE_FILES};${DnsSdlib}")
+ check_include_files ("${DnsSdlib}" HAVE_DNS_SD)
+ if (NOT HAVE_DNS_SD)
+ message (FATAL_ERROR "Missing header: " ${DnsSdlib})
+ endif()
endif()
endif()
--
2.29.2
|