File: InstallPDB.cmake

package info (click to toggle)
apitrace 9.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,452 kB
  • sloc: cpp: 179,068; ansic: 55,025; python: 33,678; makefile: 103; sh: 103
file content (17 lines) | stat: -rw-r--r-- 618 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function (INSTALL_PDB target_name)
    if (MSVC)
        get_target_property (target_output_name ${target_name} OUTPUT_NAME)
        if (NOT target_output_name)
            set (target_output_name ${target_name})
        endif ()

        # The documentation for the INSTALL command doesn't mention generator
        # expressions, but they actually work quite well, both when building
        # MSBuild and Ninja.
        install (
            FILES "$<TARGET_FILE_DIR:${target_name}>/${target_output_name}.pdb"
            CONFIGURATIONS Debug RelWithDebInfo
            ${ARGV}
        )
    endif()
endfunction ()