Skip to content

Commit

Permalink
Add samples CMakeLists. (see pocoproject#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
soroshsabz committed May 12, 2017
1 parent fe1f856 commit 79ccb8d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Avahi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand Down
2 changes: 1 addition & 1 deletion Bonjour/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(DNSSDBrowser)
add_subdirectory(HTTPTimeServer)
7 changes: 7 additions & 0 deletions samples/DNSSDBrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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} )
7 changes: 7 additions & 0 deletions samples/HTTPTimeServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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} )

0 comments on commit 79ccb8d

Please sign in to comment.