X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=cli%2FCMakeLists.txt;h=299c3985a3284c120f8b33bf83df16fa77c98d92;hb=d6b7eb6b7c8280762fb635a6e63aa3a426694ed7;hp=e5ad36d990979e84e921bf9008d8b14d15489353;hpb=c76fc373508945f419e56b3736f9fb2c8e088ad2;p=apitrace diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index e5ad36d..299c398 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -20,9 +20,11 @@ add_executable (apitrace cli_pickle.cpp cli_repack.cpp cli_retrace.cpp + cli_sed.cpp cli_trace.cpp cli_trim.cpp cli_resources.cpp + trace_analyzer.cpp ) target_link_libraries (apitrace @@ -32,4 +34,23 @@ target_link_libraries (apitrace ${GETOPT_LIBRARIES} ) +if (NOT CMAKE_CROSSCOMPILING) + set_target_properties (apitrace PROPERTIES + # On debug builds tell where the source is so that scripts can be found + COMPILE_DEFINITIONS_DEBUG APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}" + ) +endif () + +if (MSVC) + # On MSVC builds tell which subdirectory the binaries with be (for each + # configuration) + set_target_properties (apitrace PROPERTIES + COMPILE_DEFINITIONS_DEBUG APITRACE_CONFIGURATION_SUBDIR="Debug" + COMPILE_DEFINITIONS_RELEASE APITRACE_CONFIGURATION_SUBDIR="Release" + COMPILE_DEFINITIONS_MINSIZEREL APITRACE_CONFIGURATION_SUBDIR="MinSizeRel" + COMPILE_DEFINITIONS_RELWITHDEBINFO APITRACE_CONFIGURATION_SUBDIR="RelWithDebInfo" + ) +endif () + + install (TARGETS apitrace RUNTIME DESTINATION bin)