-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Hi guys,
Today, I'm updating libraw in vcpkg, but some errors occurred during the installation process:
CMake Error at cmake_install.cmake:66 (file):
file INSTALL cannot find
"F:/vcpkg/buildtrees/libraw/x86-windows-dbg/raw.pdb": File exists.
After checking the generated files, I found that the pdb file "raw.pdb" does not exist in the debug folder. Instead, I found the file rawd.pdb.
So I checked the CMakeLists.txt:
Lines 108 to 110 in 5d54a89
| IF(WIN32 AND NOT DEFINED CMAKE_DEBUG_POSTFIX) | |
| SET(CMAKE_DEBUG_POSTFIX "d") | |
| ENDIF() |
When we set
CMAKE_DEBUG_POSTFIX here, the target output name will always add the suffix d. The resulting pdb file is rawd/raw_rd instead of raw/raw_r.
So here:
Lines 623 to 632 in 5d54a89
| IF(MSVC) | |
| INSTALL(FILES ${PROJECT_BINARY_DIR}/raw.pdb | |
| DESTINATION lib | |
| CONFIGURATIONS Debug RelWithDebInfo | |
| ) | |
| INSTALL(FILES ${PROJECT_BINARY_DIR}/raw_r.pdb | |
| DESTINATION lib | |
| CONFIGURATIONS Debug RelWithDebInfo | |
| ) | |
| ENDIF() |
Should be:
IF(MSVC AND BUILD_SHARED_LIBS)
INSTALL(FILES ${PROJECT_BINARY_DIR}/raw${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION lib
CONFIGURATIONS Debug RelWithDebInfo
)
INSTALL(FILES ${PROJECT_BINARY_DIR}/raw_r${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION lib
CONFIGURATIONS Debug RelWithDebInfo
)
ENDIF()Thanks,
Jon
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels