MSVC version resource support
This commit is contained in:
parent
4b45906f46
commit
9cd695a1db
|
@ -26,8 +26,19 @@ set(NGHTTP2_SOURCES
|
||||||
nghttp2_debug.c
|
nghttp2_debug.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(NGHTTP2_RES "")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
configure_file(
|
||||||
|
version.rc.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/version.rc
|
||||||
|
@ONLY)
|
||||||
|
|
||||||
|
set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Public shared library
|
# Public shared library
|
||||||
add_library(nghttp2 SHARED ${NGHTTP2_SOURCES})
|
add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES})
|
||||||
set_target_properties(nghttp2 PROPERTIES
|
set_target_properties(nghttp2 PROPERTIES
|
||||||
COMPILE_FLAGS "${WARNCFLAGS}"
|
COMPILE_FLAGS "${WARNCFLAGS}"
|
||||||
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
|
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
SUBDIRS = includes
|
SUBDIRS = includes
|
||||||
|
|
||||||
EXTRA_DIST = Makefile.msvc CMakeLists.txt
|
EXTRA_DIST = Makefile.msvc CMakeLists.txt version.rc.in
|
||||||
|
|
||||||
AM_CFLAGS = $(WARNCFLAGS) $(EXTRACFLAG)
|
AM_CFLAGS = $(WARNCFLAGS) $(EXTRACFLAG)
|
||||||
AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes -DBUILDING_NGHTTP2 \
|
AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes -DBUILDING_NGHTTP2 \
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
#include <winver.h>
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
|
||||||
|
FILEVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0
|
||||||
|
PRODUCTVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
FILEOS 0x40004L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define VER_STR "@PROJECT_VERSION@.0 (MSVC debug)"
|
||||||
|
#define DBG "d"
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
#define VER_STR "@PROJECT_VERSION@.0 (MSVC release)"
|
||||||
|
#define DBG ""
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "https://nghttp2.org/"
|
||||||
|
VALUE "FileDescription", "nghttp2; HTTP/2 C library"
|
||||||
|
VALUE "FileVersion", VER_STR
|
||||||
|
VALUE "InternalName", "nghttp2" DBG
|
||||||
|
VALUE "LegalCopyright", "The MIT License"
|
||||||
|
VALUE "LegalTrademarks", ""
|
||||||
|
VALUE "OriginalFilename", "nghttp2" DBG ".dll"
|
||||||
|
VALUE "ProductName", "NGHTTP2."
|
||||||
|
VALUE "ProductVersion", VER_STR
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
Loading…
Reference in New Issue