/thirdparty/breakpad/CMakeLists.txt

http://github.com/tomahawk-player/tomahawk · CMake · 88 lines · 78 code · 8 blank · 2 comment · 2 complexity · a48b792ea23d5712df616687bdf86d93 MD5 · raw file

  1. PROJECT(breakpad)
  2. cmake_minimum_required(VERSION 2.8)
  3. set( CMAKE_MODULE_PATH
  4. ${CMAKE_MODULE_PATH}
  5. ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
  6. )
  7. if( CMAKE_COMPILER_IS_GNUCXX )
  8. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
  9. endif()
  10. if(${CMAKE_BUILD_TYPE} MATCHES "Release")
  11. add_definitions(-DNDEBUG)
  12. endif(${CMAKE_BUILD_TYPE} MATCHES "Release")
  13. IF(UNIX)
  14. IF(APPLE)
  15. SET( breakpadSources
  16. client/mac/crash_generation/crash_generation_client.cc
  17. client/mac/crash_generation/crash_generation_server.cc
  18. client/mac/handler/breakpad_nlist_64.cc
  19. client/mac/handler/dynamic_images.cc
  20. client/mac/handler/exception_handler.cc
  21. client/mac/handler/minidump_generator.cc
  22. client/mac/handler/protected_memory_allocator.cc
  23. # client/mac/Framework/Breakpad.mm
  24. # client/mac/Framework/OnDemandServer.mm
  25. common/mac/file_id.cc
  26. common/mac/macho_id.cc
  27. common/mac/macho_reader.cc
  28. common/mac/macho_utilities.cc
  29. common/mac/macho_walker.cc
  30. common/mac/string_utilities.cc
  31. common/md5.cc
  32. common/mac/dump_syms.mm
  33. common/mac/MachIPC.mm
  34. common/mac/SimpleStringDictionary.mm
  35. common/mac/bootstrap_compat.cc
  36. )
  37. ELSE(APPLE)
  38. SET( breakpadSources
  39. common/linux/safe_readlink.cc
  40. client/linux/crash_generation/crash_generation_client.cc
  41. client/linux/crash_generation/crash_generation_server.cc
  42. client/linux/minidump_writer/minidump_writer.cc
  43. client/linux/minidump_writer/linux_dumper.cc
  44. client/linux/handler/exception_handler.cc
  45. common/linux/dump_symbols.cc
  46. common/linux/file_id.cc
  47. common/linux/libcurl_wrapper.cc
  48. common/linux/google_crashdump_uploader.cc
  49. common/linux/synth_elf.cc
  50. common/linux/http_upload.cc
  51. common/linux/guid_creator.cc
  52. common/linux/elf_symbols_to_module.cc
  53. client/minidump_file_writer.cc
  54. client/linux/minidump_writer/linux_ptrace_dumper.cc
  55. common/linux/memory_mapped_file.cc
  56. client/linux/log/log.cc
  57. )
  58. ENDIF(APPLE)
  59. LIST(APPEND breakpadSources
  60. client/minidump_file_writer.cc
  61. common/convert_UTF.c
  62. common/string_conversion.cc
  63. )
  64. ENDIF(UNIX)
  65. IF(WIN32)
  66. ADD_DEFINITIONS( -DUNICODE -fshort-wchar )
  67. SET( breakpadSources
  68. client/windows/handler/exception_handler.cc
  69. client/windows/crash_generation/crash_generation_client.cc
  70. common/windows/guid_string.cc
  71. )
  72. ENDIF(WIN32)
  73. INCLUDE_DIRECTORIES(.)
  74. ADD_DEFINITIONS( -fPIC )
  75. IF(WIN32)
  76. ADD_LIBRARY( tomahawk_breakpad SHARED ${breakpadSources} )
  77. ELSE()
  78. ADD_LIBRARY( tomahawk_breakpad STATIC ${breakpadSources} )
  79. ENDIF()
  80. TARGET_LINK_LIBRARIES( tomahawk_breakpad )