CMakeLists.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. cmake_minimum_required(VERSION 2.4)
  2. if(COMMAND CMAKE_POLICY)
  3. cmake_policy(SET CMP0003 NEW)
  4. endif(COMMAND CMAKE_POLICY)
  5. project(CURL C)
  6. include_regular_expression("^.*$")
  7. # Setup package meta-data
  8. set(PACKAGE "curl")
  9. set(VERSION "7.19.1")
  10. set(PACKAGE_TARNAME "curl")
  11. set(PACKAGE_BUGREPORT " ")
  12. set(PACKAGE_NAME "curl")
  13. set(PACKAGE_VERSION "-")
  14. set(PACKAGE_STRING "curl-")
  15. set(PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/")
  16. set(OS "${CMAKE_SYSTEM_NAME}")
  17. # We need ansi c-flags, especially on HP
  18. set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
  19. set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
  20. # Disable warnings on Borland to avoid changing 3rd party code.
  21. if(BORLAND)
  22. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
  23. endif(BORLAND)
  24. # If we are on AIX, do the _ALL_SOURCE magic
  25. if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
  26. set(_ALL_SOURCE 1)
  27. endif(${CMAKE_SYSTEM_NAME} MATCHES AIX)
  28. include_directories(
  29. ${CURL_BINARY_DIR}/include
  30. ${CURL_SOURCE_DIR}/include
  31. ${CURL_SOURCE_DIR}/lib
  32. ${CURL_BINARY_DIR}/lib)
  33. if(CMAKE_COMPILER_2005)
  34. add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
  35. add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
  36. endif(CMAKE_COMPILER_2005)
  37. add_definitions(-DHAVE_CONFIG_H
  38. -DCURL_STATICLIB)
  39. option(CURL_SKIP_EXAMPLES "Skip building the curl examples" FALSE)
  40. add_subdirectory(lib)
  41. add_subdirectory(src)
  42. add_subdirectory(docs)