From eae1bbac182f9966ec652cce954f65c9046463a0 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 23 Feb 2023 09:38:12 -0500 Subject: [build] _WIN32 shared dll build (autotools, cmake) There are likely better and cleaner ways to do this; patches welcome. _WIN32 symbol imports and exports MS Visual Studio (_MSC_VER) does not appear to export global data symbols even when exporting all functions. Annotating any symbols with __declspec(dllexport) in any translation unit appears to change default dll symbol implict export behavior. Currently, src/Makefile.am and CMakeLists.txt take different approaches (implib versus linking against executable which has exported symbols) x-ref: (improved solutions might possibly be constructed using these docs) https://sourceware.org/binutils/docs/ld/WIN32.html https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html https://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll --- scripts/cmake/LighttpdMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/LighttpdMacros.cmake b/scripts/cmake/LighttpdMacros.cmake index 4680d10e..2f0558e9 100644 --- a/scripts/cmake/LighttpdMacros.cmake +++ b/scripts/cmake/LighttpdMacros.cmake @@ -13,7 +13,7 @@ macro(ADD_AND_INSTALL_LIBRARY LIBNAME SRCFILES) set(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} ${LIBNAME}) ## Windows likes to link it this way back to app! if(WIN32) - set_target_properties(${LIBNAME} PROPERTIES LINK_FLAGS lighttpd.lib) + target_link_libraries(${LIBNAME} lighttpd) endif() if(APPLE) -- cgit v1.2.1