Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ if (LIBRAW_INSTALL)
if(NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
message("ClangCl does not support pdb generation with static libraries")
elseif(MSVC)
install(FILES ${PROJECT_BINARY_DIR}/raw.pdb ${PROJECT_BINARY_DIR}/raw_r.pdb
install(FILES ${PROJECT_BINARY_DIR}/raw${CMAKE_DEBUG_POSTFIX}.pdb ${PROJECT_BINARY_DIR}/raw_r${CMAKE_DEBUG_POSTFIX}.pdb
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this break when building in release mode?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, for release builds CMAKE_DEBUG_POSTFIX will return an empty string so you'll get the same behavior as currently with the resulting installed files of raw.pdb and raw_r.pdb. At least that's what my testing shows.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CMake docs https://cmake.org/cmake/help/latest/variable/CMAKE_CONFIG_POSTFIX.html don't suggest that this is only set for matching build types. Which makes sense to me as having this information available in general is useful for multi-config generators.
@hartcw Any advice since you added pdb installation in 9e4991f?

DESTINATION ${CMAKE_INSTALL_LIBDIR}
CONFIGURATIONS Debug RelWithDebInfo
)
Expand Down