File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ option(FORCE_SSSE3 "Compile with SSSE3 instruction only" OFF)
15
15
option (FORCE_SSE41 "Compile with SSE4.1 instruction only" OFF )
16
16
option (OPTIONAL_TEST "Compile optional test (might be broken)" OFF )
17
17
# UNITTEST option must be after CMAKE_BUILT_TYPE
18
+ option (OPTIONAL_DNSSD "Include support for DNS-SD" ON )
18
19
19
20
# where cmake find custom modules
20
21
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake/modules)
@@ -163,9 +164,11 @@ elseif(APPLE)
163
164
set (CMAKE_MACOSX_RPATH ON )
164
165
message (STATUS "RPATH support: ${CMAKE_MACOSX_RPATH} " )
165
166
166
- # just blindly enable dns-sd
167
- set (USE_MACOS_DNSSD ON )
168
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_MACOS_DNSSD" )
167
+ # optionally enable dns-sd
168
+ if (OPTIONAL_DNSSD)
169
+ set (USE_MACOS_DNSSD ON )
170
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_MACOS_DNSSD" )
171
+ endif ()
169
172
170
173
elseif (WIN32 )
171
174
if (C_MSVC)
@@ -365,9 +368,11 @@ if(LINUX)
365
368
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CM108" )
366
369
endif ()
367
370
368
- find_package (Avahi)
369
- if (AVAHI_CLIENT_FOUND)
370
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_AVAHI_CLIENT" )
371
+ if (OPTIONAL_DNSSD)
372
+ find_package (Avahi)
373
+ if (AVAHI_CLIENT_FOUND)
374
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_AVAHI_CLIENT" )
375
+ endif ()
371
376
endif ()
372
377
373
378
elseif (HAVE_SNDIO)
You can’t perform that action at this time.
0 commit comments