mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
--disable-shared-libs has no effect #166
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JoeUser78 on GitHub (Apr 26, 2017).
Compiling 0.6.0 with cmake and --disable-sharesd-libs as documented in the README has absolutly no effect.
What is the correct way to build static libs and binary for 0.6.0 with cmake?
@JoeUser78 commented on GitHub (Apr 26, 2017):
Corresponding FreeBSD bugreport:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218851
@eustas commented on GitHub (Apr 26, 2017):
Going to investigate ASAP (== tomorrow)
@eustas commented on GitHub (Apr 26, 2017):
Current workaround for simple build cases would be:
cmake . && makefor static librariescmake . -DBUILD_SHARED_LIBS=ON && makefor shared librariesDigging further, why this machinery doesn't work as expected.
@JoeUser78 commented on GitHub (Apr 26, 2017):
OK, -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON did it, thanks.
@eustas commented on GitHub (Apr 26, 2017):
Thanks for the report. Going to update readme, and, most probably, release 0.6.1 after fixing buildfiles.
Line
CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON "NOT BROTLI_BUNDLED_MODE" OFF)is read as "if not in bundled mode (== top level project) then, by default, set BUILD_SHARED_LIBS=ON". For some reason, this magic didn't happen. That is what configure-cmake flag has no effect.@JoeUser78 commented on GitHub (Apr 26, 2017):
Thanks for your realy fast response and fix.
@eustas commented on GitHub (Apr 27, 2017):
Oh, I have a guess what has happened! CMake is a very nasty build system. If you occasionally use it in root project folder - you poison it. CMake will cache some variables and do unexpected things based on cached values.
That is why there is
mkdir out && cd outandmkdir out-static && cd static-outin readme.To cure the poisoned repository try
git reset --hard && git clean -dfx.@JoeUser78 commented on GitHub (Apr 27, 2017):
My builds had always been out-of-source builds (FreeBSDs Ports Makefile option
USES=cmake:outsource), so that this is not the course of the issue. Also i'm not using git but the released source code archive (v0.6.0.tar.gz).@osokin commented on GitHub (Apr 27, 2017):
Hi,
actually we'd like to see both types of libraries (shared and static) like other ports do.
Is there any chance to see three types of a build, i.e. SHARED, STATIC, COMBINED (SHARED_AND_STATIC).
Thanks in advance.
@eustas commented on GitHub (Apr 27, 2017):
Going to see, if it is possible. If you point to a sample project with CMake build, that features such option, it will help greatly.
@JoeUser78 commented on GitHub (May 2, 2017):
https://cmake.org/Wiki/CMake_FAQ#Library_questions should help a bit.
@eustas commented on GitHub (Sep 19, 2017):
Updated cmake to build both shared and static libraries the same time