CMakeLists.txt 465 B

12345678910111213141516171819202122
  1. cmake_minimum_required(VERSION 2.6)
  2. PROJECT(mdns C)
  3. ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
  4. SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
  5. SET(SOURCES main.c dns.c announce.c cache.c service.c util.c ubus.c interface.c)
  6. SET(LIBS ubox ubus resolv blobmsg_json)
  7. IF(DEBUG)
  8. ADD_DEFINITIONS(-DDEBUG -g3)
  9. ENDIF()
  10. ADD_EXECUTABLE(mdns ${SOURCES})
  11. TARGET_LINK_LIBRARIES(mdns ${LIBS})
  12. INSTALL(TARGETS mdns
  13. RUNTIME DESTINATION sbin
  14. )