Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8405 for code/trunk


Ignore:
Timestamp:
May 5, 2011, 5:31:25 PM (14 years ago)
Author:
rgrieder
Message:

Added MSVC option to install the *.pdb debug symbols files as well.

Location:
code/trunk/cmake
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/InstallConfig.cmake

    r8351 r8405  
    3737ELSE()
    3838  OPTION(INSTALL_COPYABLE "${_info_text}" TRUE)
     39ENDIF()
     40
     41IF(MSVC)
     42  # Allow developers to install the debug symbols as well (safes the copying)
     43  OPTION(INSTALL_PDB_FILES "Also installs the debug symbol files" FALSE)
    3944ENDIF()
    4045
  • code/trunk/cmake/PackageConfig.cmake

    r8368 r8405  
    8383        CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel
    8484      )
     85      IF(INSTALL_PDB_FILES) # MSVC specific: install debug symbols files
     86        GET_FILENAME_COMPONENT(_base_name ${_file} NAME_WE)
     87        IF(EXISTS ${DEP_BINARY_DIR}/${_base_name}.pdb)
     88          INSTALL(
     89            FILES ${DEP_BINARY_DIR}/${_base_name}.pdb
     90            DESTINATION bin
     91            CONFIGURATIONS RelForDevs RelWithDebInfo
     92          )
     93        ENDIF()
     94      ENDIF()
    8595    ENDFOREACH(_file)
    8696  ELSE()
  • code/trunk/cmake/tools/TargetUtilities.cmake

    r8351 r8405  
    354354      )
    355355    ENDIF()
     356    IF(INSTALL_PDB_FILES) # MSVC specific: install debug symbols files
     357      FOREACH(_config RelForDevs RelWithDebInfo)
     358        GET_TARGET_PROPERTY(_location ${_target_name} LOCATION_${_config})
     359        # Get absolute location without dll/exe extension
     360        STRING(REGEX REPLACE "^(.+)\\.(dll|exe)$" "\\1" _location_we ${_location})
     361        IF(_arg_MODULE)
     362          INSTALL(FILES ${_location_we}.pdb
     363            DESTINATION ${MODULE_INSTALL_DIRECTORY}
     364            CONFIGURATIONS ${_config}
     365          )
     366        ELSE()
     367          INSTALL(FILES ${_location_we}.pdb
     368            DESTINATION ${RUNTIME_INSTALL_DIRECTORY}
     369            CONFIGURATIONS ${_config}
     370          )
     371        ENDIF()
     372      ENDFOREACH(_config)
     373    ENDIF()
    356374  ENDIF()
    357375
Note: See TracChangeset for help on using the changeset viewer.