Build: Embed version/API/(C) info in MSVC DLLs

Based on:
da7a18801a

Closes #576
This commit is contained in:
DRC
2022-02-01 12:53:28 -06:00
parent d7d16df646
commit a3d4aadd0d
7 changed files with 101 additions and 14 deletions

View File

@@ -35,6 +35,11 @@ if(WIN32)
set(DEFFILE ../win/jpeg${SO_MAJOR_VERSION}.def)
endif()
endif()
if(MSVC)
configure_file(${CMAKE_SOURCE_DIR}/win/jpeg.rc.in
${CMAKE_BINARY_DIR}/win/jpeg.rc)
set(JPEG_SRCS ${JPEG_SRCS} ${CMAKE_BINARY_DIR}/win/jpeg.rc)
endif()
add_library(jpeg SHARED ${JPEG_SRCS} ${DEFFILE} $<TARGET_OBJECTS:simd>
${SIMD_OBJS})