CMakeLists.txt 786 B

1234567891011121314151617181920212223242526272829
  1. cmake_minimum_required(VERSION 2.8.1)
  2. project(mapcalc C)
  3. set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
  4. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c99")
  5. FIND_PATH(ubus_include_dir libubus.h)
  6. INCLUDE_DIRECTORIES(${ubus_include_dir})
  7. add_definitions(-D_GNU_SOURCE -Wall -Wno-gnu -Wextra)
  8. add_executable(mapcalc mapcalc.c)
  9. target_link_libraries(mapcalc ubus ubox)
  10. install(TARGETS mapcalc DESTINATION sbin/)
  11. # Packaging rules
  12. set(CPACK_PACKAGE_VERSION "1")
  13. set(CPACK_PACKAGE_CONTACT "Steven Barth <steven@midlink.org>")
  14. set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "hnetd")
  15. set(CPACK_GENERATOR "DEB;RPM;STGZ")
  16. set(CPACK_STRIP_FILES true)
  17. SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
  18. set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}")
  19. include(CPack)