diff --git a/Avahi/CMakeLists.txt b/Avahi/CMakeLists.txt index 8ec896d226..2c7236294b 100644 --- a/Avahi/CMakeLists.txt +++ b/Avahi/CMakeLists.txt @@ -20,7 +20,7 @@ set_target_properties( "${LIBNAME}" DEFINE_SYMBOL Avahi_EXPORTS ) -target_link_libraries( "${LIBNAME}" Foundation Net DNSSD ${Avahi_LIBRARIES}) +target_link_libraries( "${LIBNAME}" Foundation Net DNSSD ${AVAHI_LIBRARIES}) target_include_directories( "${LIBNAME}" PUBLIC $ diff --git a/Bonjour/CMakeLists.txt b/Bonjour/CMakeLists.txt index 770953fe1b..4ce7e6e396 100644 --- a/Bonjour/CMakeLists.txt +++ b/Bonjour/CMakeLists.txt @@ -20,7 +20,7 @@ set_target_properties( "${LIBNAME}" DEFINE_SYMBOL Bonjour_EXPORTS ) -target_link_libraries( "${LIBNAME}" Foundation Net DNSSD ${Bonjour_LIBRARIES}) +target_link_libraries( "${LIBNAME}" Foundation Net DNSSD ${BONJOUR_LIBRARIES}) target_include_directories( "${LIBNAME}" PUBLIC $ diff --git a/CMakeLists.txt b/CMakeLists.txt index c666deae7e..55b8024ab6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,14 @@ # ITNOA +set(DNSSD_IMPLEMENTATION_LIBRARY "") + macro(ADD_AVAHI) find_package(Avahi REQUIRED) if(AVAHI_FOUND) include_directories("${AVAHI_INCLUDE_DIR}") message(STATUS "Avahi Support Enabled") add_subdirectory( Avahi ) + set(DNSSD_IMPLEMENTATION_LIBRARY "DNSSDAvahi") else() message(ERROR "Avahi does not found, please make install it") endif() @@ -17,6 +20,7 @@ macro(ADD_BONJOUR) include_directories("${BONJOUR_INCLUDE_DIR}") message(STATUS "Bonjour Support Enabled") add_subdirectory( Bonjour ) + set(DNSSD_IMPLEMENTATION_LIBRARY "DNSSDBonjour") else() message(ERROR "Bonjour does not found, please make install sdk") endif() diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt new file mode 100644 index 0000000000..790d900781 --- /dev/null +++ b/samples/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(DNSSDBrowser) +add_subdirectory(HTTPTimeServer) diff --git a/samples/DNSSDBrowser/CMakeLists.txt b/samples/DNSSDBrowser/CMakeLists.txt new file mode 100644 index 0000000000..0970f51ae2 --- /dev/null +++ b/samples/DNSSDBrowser/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SAMPLE_NAME "DNSSDBrowser") + +set(LOCAL_SRCS "") +aux_source_directory(src LOCAL_SRCS) + +add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +target_link_libraries( ${SAMPLE_NAME} Foundation Net Util XML DNSSD ${DNSSD_IMPLEMENTATION_LIBRARY} ) diff --git a/samples/HTTPTimeServer/CMakeLists.txt b/samples/HTTPTimeServer/CMakeLists.txt new file mode 100644 index 0000000000..b9bd48e273 --- /dev/null +++ b/samples/HTTPTimeServer/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SAMPLE_NAME "DNSSDHTTPTimeServer") + +set(LOCAL_SRCS "") +aux_source_directory(src LOCAL_SRCS) + +add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +target_link_libraries( ${SAMPLE_NAME} Foundation Net Util XML DNSSD ${DNSSD_IMPLEMENTATION_LIBRARY} )