mirror of
https://github.com/libjpeg-turbo/libjpeg-turbo
synced 2025-03-28 21:13:18 +00:00
Build: Optionally install PDB files for MSVC DLLs
Based on
333a36ae98
Closes #329
Closes #324
This commit is contained in:
parent
e2442e0707
commit
75be88cfbd
@ -1332,6 +1332,11 @@ if(WITH_TURBOJPEG)
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
|
||||
CMAKE_C_LINKER_SUPPORTS_PDB)
|
||||
install(FILES "$<TARGET_PDB_FILE:turbojpeg>"
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_STATIC)
|
||||
install(TARGETS turbojpeg-static ARCHIVE
|
||||
|
@ -52,7 +52,8 @@ if(MAPFLAG)
|
||||
LINK_FLAGS "${MAPFLAG}${CMAKE_CURRENT_BINARY_DIR}/../libjpeg.map")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set_target_properties(jpeg PROPERTIES SUFFIX ${SO_MAJOR_VERSION}.dll)
|
||||
set_target_properties(jpeg PROPERTIES
|
||||
RUNTIME_OUTPUT_NAME jpeg${SO_MAJOR_VERSION})
|
||||
# The jsimd_*.c file is built using /MT, so this prevents a linker warning.
|
||||
set_target_properties(jpeg PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD")
|
||||
elseif(MINGW)
|
||||
@ -91,3 +92,8 @@ install(TARGETS jpeg cjpeg djpeg jpegtran
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
|
||||
CMAKE_C_LINKER_SUPPORTS_PDB)
|
||||
install(FILES "$<TARGET_PDB_FILE:jpeg>"
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user