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
30 target_link_libraries (apitrace
37 if (NOT CMAKE_CROSSCOMPILING)
38 set_target_properties (apitrace PROPERTIES
39 # On debug builds tell where the source is so that scripts can be found
40 COMPILE_DEFINITIONS_DEBUG APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
45 # On MSVC builds tell which subdirectory the binaries with be (for each
47 set_target_properties (apitrace PROPERTIES
48 COMPILE_DEFINITIONS_DEBUG APITRACE_CONFIGURATION_SUBDIR="Debug"
49 COMPILE_DEFINITIONS_RELEASE APITRACE_CONFIGURATION_SUBDIR="Release"
50 COMPILE_DEFINITIONS_MINSIZEREL APITRACE_CONFIGURATION_SUBDIR="MinSizeRel"
51 COMPILE_DEFINITIONS_RELWITHDEBINFO APITRACE_CONFIGURATION_SUBDIR="RelWithDebInfo"
56 install (TARGETS apitrace RUNTIME DESTINATION bin)