X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=cli%2FCMakeLists.txt;h=3165f7da662abf4bf8007f50ea474f8d3bb626de;hb=166e4c0065829d26b2d0272335f983162d9ab4df;hp=5df363ab943680dc34a5ee121fa10c40553bc211;hpb=77373c35010d89e5ab3f030e4c60f8f6e3fdbe82;p=apitrace diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 5df363a..3165f7d 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -1,3 +1,14 @@ +# Expose the binary/install directories to source +# +# TODO: Use the same directory layout, for both build and install directories, +# so that binaries can find each other using just relative paths. +# +add_definitions( + -DAPITRACE_PROGRAMS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/bin" + -DAPITRACE_SCRIPTS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTS_INSTALL_DIR}" + -DAPITRACE_WRAPPERS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}" +) + add_executable (apitrace cli_main.cpp cli_diff.cpp @@ -11,15 +22,23 @@ add_executable (apitrace cli_retrace.cpp cli_trace.cpp cli_trim.cpp + cli_resources.cpp trace_analyzer.cpp + trim_callset.cpp ) target_link_libraries (apitrace common - ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SNAPPY_LIBRARIES} ${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 () + install (TARGETS apitrace RUNTIME DESTINATION bin)