CMakeLists.txt 636 B

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 2.6)
  2. INCLUDE(CheckIncludeFiles)
  3. PROJECT(uclient C)
  4. ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
  5. SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
  6. IF(APPLE)
  7. INCLUDE_DIRECTORIES(/opt/local/include)
  8. LINK_DIRECTORIES(/opt/local/lib)
  9. ENDIF()
  10. ADD_LIBRARY(uclient SHARED uclient.c uclient-http.c uclient-utils.c)
  11. TARGET_LINK_LIBRARIES(uclient ubox ustream-ssl)
  12. ADD_EXECUTABLE(uclient-example uclient-example.c)
  13. TARGET_LINK_LIBRARIES(uclient-example uclient)
  14. INSTALL(FILES uclient.h uclient-utils.h
  15. DESTINATION include/libubox
  16. )
  17. INSTALL(TARGETS uclient
  18. LIBRARY DESTINATION lib
  19. )