Fix compiling static lib on Windows with MSVC
On Windows, the DLL will create nghttp2.lib AND nghttp2.dll. Then the static lib also tries to build nghttp2.lib, but that fails because it already exists. The nghttp2.lib created for the DLL cannot be used without the DLL. This compiles the static nghttp2.lib into a separate directory, which works around the above issue. Signed-off-by: Matthew Horan <mhoran@pivotal.io>
This commit is contained in:
parent
e5b3f9addd
commit
17df41def0
|
@ -56,6 +56,7 @@ if(HAVE_CUNIT OR ENABLE_STATIC_LIB)
|
|||
COMPILE_FLAGS "${WARNCFLAGS}"
|
||||
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
|
||||
ARCHIVE_OUTPUT_NAME nghttp2
|
||||
ARCHIVE_OUTPUT_DIRECTORY static
|
||||
)
|
||||
target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB")
|
||||
if(ENABLE_STATIC_LIB)
|
||||
|
|
Loading…
Reference in New Issue