Imath
Imath copied to clipboard
No PDB files installed on Windows
PDB files aren't installed when doing a Debug or RelWithDebInfo build on Windows.
This can be fixed by explicitly setting compiler generated PDB names:
if(WIN32)
set_target_properties(${libname} PROPERTIES
COMPILE_PDB_NAME "${libname}"
)
endif()
and installing both compiler and linker generated PDB files:
if(WIN32)
if(BUILD_SHARED_LIBS)
install(
FILES $<TARGET_PDB_FILE:${libname}>
DESTINATION ${CMAKE_INSTALL_BINDIR}
OPTIONAL
)
else()
install(
FILES $<TARGET_FILE_DIR:${libname}>/${libname}.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR}
OPTIONAL
)
endif()
endif()
for both Imath and PyImath libraries.
Would you like to submit a PR for that? Or we can patch it; looks like a good addition.
Hi @meshula, happy to submit a PR just waiting for corporate CLA approval.
Should this perhaps be if(MSVC) specific (which also includes clang-cl) rather than if(WIN32) which will include MinGW (gcc and clang) as well and which do not generate PDB?