/reporting/crashrpttest/CMakeLists.txt

http://crashrpt.googlecode.com/ · CMake · 51 lines · 32 code · 10 blank · 9 comment · 1 complexity · 8a7874be544443b23caaba4358398615 MD5 · raw file

  1. project(CrashRptTest)
  2. # Create the list of source files
  3. aux_source_directory( . source_files )
  4. # Enable usage of precompiled header
  5. set(srcs_using_precomp ${source_files})
  6. list(REMOVE_ITEM srcs_using_precomp ./stdafx.cpp)
  7. add_msvc_precompiled_header(stdafx.h ./stdafx.cpp srcs_using_precomp)
  8. # Include resource file
  9. list(APPEND source_files ./CrashRptTest.rc )
  10. # Define _UNICODE (use wide-char encoding)
  11. add_definitions(-D_UNICODE )
  12. fix_default_compiler_settings_()
  13. # Add include dir
  14. include_directories(${CMAKE_SOURCE_DIR}/include
  15. ${CMAKE_SOURCE_DIR}/thirdparty/wtl)
  16. # Add executable build target
  17. add_executable(CrashRptTest WIN32 ${source_files})
  18. # Add input link libraries
  19. target_link_libraries(CrashRptTest CrashRpt)
  20. # Add "d" postfix to output file name in Debug
  21. set_target_properties(CrashRptTest PROPERTIES DEBUG_POSTFIX d )
  22. # Add post-build event
  23. if(CMAKE_CL_64)
  24. ADD_CUSTOM_COMMAND(
  25. TARGET CrashRptTest
  26. POST_BUILD
  27. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
  28. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/reporting/crashrpttest\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
  29. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/reporting/crashrpttest\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
  30. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\""
  31. )
  32. else(CMAKE_CL_64)
  33. ADD_CUSTOM_COMMAND(
  34. TARGET CrashRptTest
  35. POST_BUILD
  36. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\""
  37. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/reporting/crashrpttest\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\""
  38. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/reporting/crashrpttest\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\""
  39. COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\""
  40. )
  41. endif(CMAKE_CL_64)