Skip to content

Commit

Permalink
cmake: Package/install .PDB files too.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Oct 2, 2014
1 parent 61c4693 commit 01e5c85
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ endif ()

set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include (ConvenienceLibrary)
include (InstallPDB)

if (ANDROID)
set (ENABLE_GUI false)
Expand Down
1 change: 1 addition & 0 deletions cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ if (NOT CMAKE_CROSSCOMPILING)
endif ()

install (TARGETS apitrace RUNTIME DESTINATION bin)
install_pdb (apitrace RUNTIME DESTINATION bin)
17 changes: 17 additions & 0 deletions cmake/InstallPDB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 ()
1 change: 1 addition & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@ endif ()
########### install files ###############

install (TARGETS qapitrace RUNTIME DESTINATION bin)
install_pdb (qapitrace RUNTIME DESTINATION bin)
#install (FILES qapitrace.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
2 changes: 2 additions & 0 deletions inject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set_target_properties (injectee PROPERTIES
PREFIX ""
)
install (TARGETS injectee LIBRARY DESTINATION bin)
install_pdb (injectee DESTINATION bin)

add_executable (injector
injector.cpp
Expand All @@ -16,3 +17,4 @@ set_target_properties (injector PROPERTIES
)
target_link_libraries (injector psapi)
install (TARGETS injector RUNTIME DESTINATION bin)
install_pdb (injector DESTINATION bin)
2 changes: 2 additions & 0 deletions retrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ if (WIN32 OR APPLE OR X11_FOUND)
endif ()

install (TARGETS glretrace RUNTIME DESTINATION bin)
install_pdb (glretrace DESTINATION bin)
endif ()

if (ENABLE_EGL AND X11_FOUND AND NOT WIN32 AND NOT APPLE AND NOT ENABLE_WAFFLE)
Expand Down Expand Up @@ -280,4 +281,5 @@ if (WIN32)
endif ()

install (TARGETS d3dretrace RUNTIME DESTINATION bin)
install_pdb (d3dretrace DESTINATION bin)
endif ()
6 changes: 6 additions & 0 deletions wrappers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if (WIN32)
OUTPUT_NAME ddraw
)
install (TARGETS ddrawtrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
install_pdb (ddrawtrace DESTINATION ${WRAPPER_INSTALL_DIR})
endif ()

# d3d8.dll
Expand Down Expand Up @@ -82,6 +83,7 @@ if (WIN32)
OUTPUT_NAME d3d8
)
install (TARGETS d3d8trace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
install_pdb (d3d8trace DESTINATION ${WRAPPER_INSTALL_DIR})
endif ()

# d3d9.dll
Expand Down Expand Up @@ -118,6 +120,7 @@ if (WIN32)
OUTPUT_NAME d3d9
)
install (TARGETS d3d9trace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
install_pdb (d3d9trace DESTINATION ${WRAPPER_INSTALL_DIR})
endif ()

# dxgi.dll, d3d10.dll, d3d10_1.dll, d3d11.dll
Expand Down Expand Up @@ -172,6 +175,7 @@ if (WIN32)
PROPERTIES PREFIX ""
)
install (TARGETS dxgitrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
install_pdb (dxgitrace DESTINATION ${WRAPPER_INSTALL_DIR})
endif ()

# d2d1.dll, dwrite.dll
Expand Down Expand Up @@ -206,6 +210,7 @@ if (WIN32)
PROPERTIES PREFIX ""
)
install (TARGETS d2d1trace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
install_pdb (d2d1trace DESTINATION ${WRAPPER_INSTALL_DIR})
endif (DirectX_D2D1_INCLUDE_FOUND)

# opengl32.dll
Expand Down Expand Up @@ -242,6 +247,7 @@ if (WIN32)
OUTPUT_NAME opengl32
)
install (TARGETS wgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR})
install_pdb (wgltrace DESTINATION ${WRAPPER_INSTALL_DIR})

elseif (APPLE)
# OpenGL framework
Expand Down

0 comments on commit 01e5c85

Please sign in to comment.