Fix SRV support when building with CMake.

This commit is contained in:
Roger A. Light 2014-05-19 22:03:26 +01:00
parent cb0e355d9e
commit aab7a2688c
4 changed files with 8 additions and 1 deletions

View File

@ -65,6 +65,8 @@ else (${WITH_TLS} STREQUAL ON)
set (OPENSSL_INCLUDE_DIR "")
endif (${WITH_TLS} STREQUAL ON)
option(WITH_SRV "Include SRV lookup support?" ON)
# ========================================
# Include projects
# ========================================

View File

@ -20,6 +20,7 @@ Client library:
- Fix topic matching edge case.
- Fix callback deadlocks after calling mosquitto_disconnect(), when using the
threaded interfaces. Closes bug #1313725.
- Fix SRV support when building with CMake.
General:
- Use $(STRIP) for stripping binaries when installing, to allow easier cross

View File

@ -4,6 +4,10 @@ link_directories(${mosquitto_BINARY_DIR}/lib)
set(shared_src client_shared.c client_shared.h)
if (${WITH_SRV} STREQUAL ON)
add_definitions("-DWITH_SRV")
endif (${WITH_SRV} STREQUAL ON)
add_executable(mosquitto_pub pub_client.c ${shared_src})
add_executable(mosquitto_sub sub_client.c ${shared_src})

View File

@ -50,8 +50,8 @@ if (WIN32)
set (LIBRARIES ${LIBRARIES} ws2_32)
endif (WIN32)
option(WITH_SRV "Include SRV lookup support?" ON)
if (${WITH_SRV} STREQUAL ON)
add_definitions("-DWITH_SRV")
set (LIBRARIES ${LIBRARIES} cares)
endif (${WITH_SRV} STREQUAL ON)