1 # Expose the binary/install directories to source
3 # TODO: Use the same directory layout, for both build and install directories,
4 # so that binaries can find each other using just relative paths.
7 -DAPITRACE_PROGRAMS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/bin"
8 -DAPITRACE_SCRIPTS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTS_INSTALL_DIR}"
9 -DAPITRACE_WRAPPERS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}"
12 add_executable (apitrace
29 target_link_libraries (apitrace
36 if (NOT CMAKE_CROSSCOMPILING)
37 set_target_properties (apitrace PROPERTIES
38 # On debug builds tell where the source is so that scripts can be found
39 COMPILE_DEFINITIONS_DEBUG APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
44 # On MSVC builds tell which subdirectory the binaries with be (for each
46 set_target_properties (apitrace PROPERTIES
47 COMPILE_DEFINITIONS_DEBUG APITRACE_CONFIGURATION_SUBDIR="Debug"
48 COMPILE_DEFINITIONS_RELEASE APITRACE_CONFIGURATION_SUBDIR="Release"
49 COMPILE_DEFINITIONS_MINSIZEREL APITRACE_CONFIGURATION_SUBDIR="MinSizeRel"
50 COMPILE_DEFINITIONS_RELWITHDEBINFO APITRACE_CONFIGURATION_SUBDIR="RelWithDebInfo"
55 install (TARGETS apitrace RUNTIME DESTINATION bin)