You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am building zlib for several plarforms and have few issues.
In particular, the emscripten compiler (for doing WebAssembly from C++) does not support shared libraries, only static.
Then the following line in the cmake raises a warning: add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
because SHARED is not possible.
After the warning, CMake forces the lib to be built as STATIC instead of SHARED but then it creates another error stating that multiple targets generate the same object (because, at the end, the other line add_library(zlibstatic STATIC will generate the same) .
In my opinion, SHARED or STATIC should be a developer selection, or should be based on BUILD_SHARED_LIBS which is a standard CMake variable for this.
It is related to #575
The text was updated successfully, but these errors were encountered:
Hello,
I am building zlib for several plarforms and have few issues.
In particular, the emscripten compiler (for doing WebAssembly from C++) does not support shared libraries, only static.
Then the following line in the cmake raises a warning:
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
because
SHARED
is not possible.After the warning, CMake forces the lib to be built as STATIC instead of SHARED but then it creates another error stating that multiple targets generate the same object (because, at the end, the other line
add_library(zlibstatic STATIC
will generate the same) .In my opinion, SHARED or STATIC should be a developer selection, or should be based on
BUILD_SHARED_LIBS
which is a standard CMake variable for this.It is related to #575
The text was updated successfully, but these errors were encountered: