[WIP] use vcpkg for getopt; build windows shared lib enhancements (#350)

* fix MSVC compiler shared library issues - mostly around 'extern const'

* add vcpkg install getopt to appveyor-windows.yml

show appveyor where to get getopt from vcpkg (non-static lib to avoid LGPL violation)

* add missing else case in lsquic_shared_support.h for windows static lib path

* have cmake spit out it's version

have cmake copy dependent dlls to build dir for tests on windows (getopt.dll)

* copy getopt.dll dep for tests

added commented version that requires >= 3.21 but handles any dll deps

* try caching boringssl dir to reduce CI build time since it's always same commit specified in config file

define VCPKG_ROOT in env since I can't seem to find it by VCPKG_ROOT or VCPKG_INSTALLED_DIR in appveyor's cmake v3.16 + vcpkg

* make windows cache dependent on yml and cmd

* sync up with changes to ls-qpack
This commit is contained in:
Tyler Young 2021-12-15 11:38:20 -05:00 committed by GitHub
parent df67278304
commit f07b3eae43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 1182 additions and 2124 deletions

View file

@ -18,22 +18,20 @@ IF(MSVC)
ENDIF()
LIST(APPEND LIBS ws2_32)
LIST(APPEND LIBS iphlpapi)
LIST(APPEND LIBS ${GETOPT_LIB})
ENDIF()
IF(MSVC)
SET(GETOPT_C ../wincompat/getopt.c)
ENDIF()
add_executable(http_server http_server.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(http_server http_server.c prog.c test_common.c test_cert.c)
IF(NOT MSVC) # TODO: port MD5 server and client to Windows
add_executable(md5_server md5_server.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(md5_client md5_client.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(md5_server md5_server.c prog.c test_common.c test_cert.c)
add_executable(md5_client md5_client.c prog.c test_common.c test_cert.c)
ENDIF()
add_executable(echo_server echo_server.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(echo_client echo_client.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(duck_server duck_server.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(duck_client duck_client.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(perf_client perf_client.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(perf_server perf_server.c prog.c test_common.c test_cert.c ${GETOPT_C})
add_executable(echo_server echo_server.c prog.c test_common.c test_cert.c)
add_executable(echo_client echo_client.c prog.c test_common.c test_cert.c)
add_executable(duck_server duck_server.c prog.c test_common.c test_cert.c)
add_executable(duck_client duck_client.c prog.c test_common.c test_cert.c)
add_executable(perf_client perf_client.c prog.c test_common.c test_cert.c)
add_executable(perf_server perf_server.c prog.c test_common.c test_cert.c)
IF (NOT MSVC)
@ -53,8 +51,6 @@ add_executable(http_client
prog.c
test_common.c
test_cert.c
../wincompat/getopt.c
../wincompat/getopt1.c
)
ENDIF()