restore gtest win32 patch (stripped during gtest rebase)

enable lokinet shared library on win32

TODO: define an API to expose from this library
currently, it resorts to exporting *everything*
including system implementation details that otherwise
should remain hidden out of sight
(i.e. the winsock2 load stubs for new socket API, or entire libstdc++ classes!)
pull/283/head
Rick V 5 years ago
parent d0448dfb64
commit 7f52c9eae7
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

@ -8,7 +8,7 @@ option(USE_LIBABYSS "enable libabyss" )
option(USE_AVX2 "enable avx2 code" )
option(USE_NETNS "enable networking namespace support. Linux only" )
option(AMD_RYZEN_HACK "hack for AMD Ryzen FPU bug (support FMA3 and FMA4 in FPU, but does not show in CPUID)" )
option(STATIC_LINK "emit fully linked binaries" )
option(STATIC_LINK "do not build liblokinet-shared")
option(NON_PC_TARGET "non-pc target build: iphone, andriod, embedded non-i386 SBC, etc" )
option(SHADOW "use shadow testing framework. linux only" )
option(ASAN "use address sanitiser, if your system has it" )
@ -785,7 +785,11 @@ else()
if(WITH_SHARED)
add_library(${SHARED_LIB} SHARED ${LIB_SRC})
target_link_libraries(${SHARED_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${UTIL_LIB} ${PLATFORM_LIB} Threads::Threads)
install(TARGETS ${SHARED_LIB} LIBRARY DESTINATION lib)
if (WIN32)
target_link_libraries(${SHARED_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${UTIL_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi Threads::Threads)
else (NOT WIN32)
target_link_libraries(${SHARED_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${UTIL_LIB} ${PLATFORM_LIB} Threads::Threads)
install(TARGETS ${SHARED_LIB} LIBRARY DESTINATION lib)
endif(WIN32)
endif(WITH_SHARED)
endif(SHADOW)

@ -16,7 +16,11 @@ option(gtest_build_tests "Build all of gtest's own tests." OFF)
option(gtest_build_samples "Build gtest's sample programs." OFF)
if (WIN32)
option(gtest_disable_pthreads "Disable uses of pthreads in gtest." ON)
else (NOT WIN32)
option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
endif(WIN32)
option(
gtest_hide_internal_symbols

Loading…
Cancel
Save