PageRenderTime 11ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/reporting/crashrpttest/CMakeLists.txt

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