aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-01-16simplify log2 check; currently we rely more on compiler than build systemEvgenii Kliuchnikov1-19/+4
PiperOrigin-RevId: 598794971
2023-12-08Merge branch 'master' into brotli-cmake-tweaksEugene Kliuchnikov1-27/+32
2023-11-27add an option to disable brotli toolsEvgenii Kliuchnikov1-27/+32
PiperOrigin-RevId: 585593185
2023-09-21CMakeLists.txt: use `CMAKE_INSTALL_FULL_MANDIR` for mans installSergei Trofimovich1-2/+2
Without the change install just fails for me as `SHARE_INSTALL_PREFIX` is unset for me. Following https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html I'm using absolute path expansion to install mans.
2023-09-21CMakeLists.txt: use CMAKE_INSTALL_FULL_LIBDIR for runpath on darwinSergei Trofimovich1-1/+1
Without the change on systems where `CMAKE_INSTALL_LIBDIR` is an absolute path outside `CMAKE_INSTALL_PREFIX` (like `nixpkgs`) libraries ended up embedding wrong RPATH and libraries failed to load. The change uses suggestion from https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html to use `CMAKE_INSTALL_FULL_LIBDIR` (similar to library install code) to enbed it as an RPATH.
2023-09-13upload full testdata archiveEvgenii Kliuchnikov1-1/+1
PiperOrigin-RevId: 565017690
2023-09-11reword cmake test generator warningEvgenii Kliuchnikov1-1/+1
PiperOrigin-RevId: 564371898
2023-08-31install man pagesTomasz Kłoczko1-0/+4
cmake modyfication to install man pages. Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
2023-07-31restore BROTLI_VERSION var in CMake buildEvgenii Kliuchnikov1-0/+1
PiperOrigin-RevId: 552507047
2023-07-31add option to delete files that are not "compressed"Evgenii Kliuchnikov1-1/+0
PiperOrigin-RevId: 552472135
2023-07-31fix missing version in CMake build (#1048)zhongfly1-0/+1
2023-07-30simplify CMake buildEvgenii Kliuchnikov1-59/+21
PiperOrigin-RevId: 552238545
2023-07-04Internal changesEvgenii Kliuchnikov1-3/+3
PiperOrigin-RevId: 545262005
2023-07-040.4-1.5% decoder speedupEvgenii Kliuchnikov1-3/+3
PiperOrigin-RevId: 513248503
2023-06-22Fix Bazel build (#1024)Eugene Kliuchnikov1-3/+3
2022-12-22Ramp up CMake to v3 (#991)Eugene Kliuchnikov1-5/+4
Drive-by: drop premake5 support
2022-12-20CMake: ensure static libraries are still installed on Emscripten (#988)Kleis Auke Wolthuizen1-8/+6
Similar to commit ce222e317e36aa362e83fc50c7a6226d238e03fd.
2022-12-16CMake: Allow using BUILD_SHARED_LIBS to choose static/shared libs (#655)Adrian Perez1-31/+15
By convention projects using CMake which can build either static or shared libraries use a BUILD_SHARED_LIBS flag to allow selecting between both: the add_library() command automatically switches between both using this variable when the library kind is not passed to add_library(). It is also usual to expose the BUILD_SHARED_LIBS as an user-facing setting with the option() command. This way, the following will both work as expected: % cmake -DBUILD_SHARED_LIBS=OFF ... % cmake -DBUILS_SHARED_LIBS=ON ... This is helpful for distributions which need (or want) to build only static libraries.
2022-11-17fix macos rpath (#976)Lukas Oberhuber1-0/+2
Without this patch, the three libraries are not provided with valid rpaths, meaning they are not packaged correctly for macos. c.f. https://github.com/google/brotli/issues/934 (which is a similar issue) but should be fixed by this fix as well. Also https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/129
2022-11-17UpdateEvgenii Kliuchnikov1-6/+0
Documentation: - add note that brotli is a "stream" format, not an archive-like - regenerate .1 with Pandoc Build: - drop legacy "BROTLI_BUILD_PORTABLE" option - drop "BROTLI_SANITIZED" definition Code: - c: comb includes - c/enc: extract encoder state into separate header - c/enc: drop designated q10 codepath - c/enc: dealing better with flushing of empty stream - fix MSVC compilation API: - py: use library version instead of one in version.h - c: add plugable API to report consumed input / produced output - c/java: support "lean" prepared dictionaries (without copy of source)
2022-05-12Wrap interface include directories with BUILD_INTERFACE generator expression ↵Anonymous Maarten1-1/+1
(#966) * Wrap interface include directories with BUILD_INTERFACE generator expression When exporting a CMake target using install(TARGETS) + install(EXPORT), CMake requires all include directories to be clean of build system directories. https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_INCLUDE_DIRECTORIES.html This change also allows use of brotli as a CMake subproject and installing + exporting it. * Fix typo in generator expression
2021-12-15Supress cmake warning (#931)Mohammad Bahoosh1-0/+5
Not providing VERSION to "project" command will cause a warning. Since this project's version is loaded from other files, this policy will help suppress the warning generated by cmake. This policy is set because we can't provide "VERSION" in "project" command. Use `cmake --help-policy CMP0048` for more information
2021-06-23Enabled install when building with emscripten. (#906)Dirk Lemstra1-10/+8
* Enabled install when building with emscripten. * Also install the pkg-config files.
2020-08-26Fix build files (#829)Eugene Kliuchnikov1-11/+15
2020-07-09CMake: change default ("") build type to Release (#818)Eugene Kliuchnikov1-0/+7
Fix #817
2020-03-19Add HAVE_LOG2 build macro (#783)Cristi Vîjdea1-1/+4
* Add HAVE_LOG2 build macro Fixes #781 * Rename macro to BROTLI_HAVE_LOG2 and move comment for visibility
2019-08-13Disable PIC in EMCC mode. (#768)Eugene Kliuchnikov1-7/+24
2019-08-07Add an option to avoid building shared libraries. (#766)Eugene Kliuchnikov1-6/+16
Add an option to avoid building shared libraries (for building with EMCC) Drive-by: * maven: ramp up java level to minimal required * travis: replace deprecated clang-5.0 with clang-7 * maven: fallback to jdk10 to void javadoc bug
2018-09-27Cross compilation support (#709)Stephen Kyle1-4/+28
* build: add cross-compilation support to make Set CROSS_COMPILE when running make to use the selected cross compilation toolchain, such as arm-linux-gnueabihf, or aarch64-linux-gnu. Testing requires the presence of qemu - 'qemu-$(ARCH)' will be executed, where ARCH is the first part of the toolchain triplet. * build: add cross-compilation support to cmake If C_COMPILER/CXX_COMPILER/CC/CXX are found to have cross-compilation triplets in front of the compiler, then qemu will be used to execute the tests. * CI: add arm-linux-gnueabihf-gcc builder to Travis The version of qemu available in Ubuntu trusty (as provided by Travis) appears to have a bug in qemu-aarch64, which leads to the compatibility tests failing on some inputs, erroneously rejecting the input as corrupt. Once Travis supports xenial, we could add an aarch64-gnu-linux-gcc builder as well. * CI: propagate cmake errors out of .travis.sh Seems like even if cmake fails, the error isn't picked up by Travis.
2018-09-13Fix auto detect of bundled mode (#704)v1.0.6Jørgen Ibsen1-3/+3
Set bundled mode to ON when parent directory is not empty. Due to the peculiarities of CMake if, comparing an undefined variable to the empty string is false, so this likely never triggered.
2018-03-26Tell CMake to not check for a C++ compiler (#653)Adrian Perez1-1/+1
By default CMake checks both for C and C++ compilers, while the latter is not needed. Setting the list of languages to just "C" in the call to project() removes the unneeded check.
2017-12-07Don't set rpath (#629)Jeremy Bicha1-10/+0
2017-11-28Update (#620)v1.0.2Eugene Kliuchnikov1-130/+50
* add autotools build * separate semantic and ABI version * extract sources.lst (used by CMake and Automake) * share pkgconfig templates (used by CMake and Automake) * decoder: always set `total_out` * encoder: fix `BROTLI_ENSURE_CAPACITY` macro (no-op after preprocessor) * decoder/encoder: refine `free_func` contract
2017-09-20Install static libraries as well (#601)Eugene Kliuchnikov1-1/+8
2017-09-19Build both static and shared libs with CMake (#599)Eugene Kliuchnikov1-20/+34
2017-05-29Update (#555)Eugene Kliuchnikov1-6/+6
Update: * new CLI; bro -> brotli; + man page * JNI wrappers preparation (for bazel build) * add raw binary dictionary representation `dictionary.bin` * add ability to side-load brotli RFC dictionary * decoder persists last error now * fix `BrotliDecoderDecompress` documentation * go reader don't block until necessary * more consistent bazel target names * Java dictionary data compiled footprint reduced * Java tests refactoring
2017-05-24Unify artifact installation (#544)Eugene Kliuchnikov1-16/+16
2017-04-23Move files & update paths (#541)Eugene Kliuchnikov1-28/+28
* Move files & update paths * Rename build to scripts. * Fix paths * Fix script.
2017-03-01Fix CMakeLists.txt specifying a nonexistent pkgconfig package (#518)Ian Duncan1-1/+1
2017-02-06Update encoder (#504)Eugene Kliuchnikov1-0/+2
* pull `BROTLI_MAX_BACKWARD_LIMIT` to constants * split generic and Zopfli backward references code * pull hashers init and stitch invocation to encoder * make `dictionary_hash` a compilation unit * add `size hint` parameter * add new hasher * use `size hint` to pick new hasher for q4 * modernize clz guard (fix #495) * move `hash to binary tree` to separate file * add `Initialize` and `Cleanup` to all hashers * do not raise OOM if malloc(0) == NULL (fix #500)
2016-12-22Split brotli common/dec/enc .pc files (#490)Eugene Kliuchnikov1-7/+40
Add URL, and use DEPENS_PRIVATE generator params
2016-11-01FInishing touches for installing libbrotli with CMake (#464)Evan Nemerson1-11/+137
* build: fix bundled mode + BUILD_SHARED_LIBS * cmake: add soversion information * cmake: generate pkg-config file
2016-10-18* leave static compilation declaration intouch (e.g. Python build)Eugene Kliuchnikov1-1/+2
2016-10-18Build shared libraries by defaultEugene Kliuchnikov1-0/+5
* Declare `BUILD_SHARED_LIBS` option for CMake * Define `${LIB}_SHARED_COMPILATION` when compiling shared library * Define and use BROTLI_xxx_API * Fix remaining unprefixed defines in port.h
2016-10-17Merge pull request #439 from fred-wang/remove-underscoreEugene Kliuchnikov1-7/+7
Remove the underscore in the name of brotli libraries. #326
2016-10-12CMake: Also add ARCHIVE DESTINATION for non-WIN32Frédéric Wang1-1/+4
2016-10-12Remove the underscore in the name of brotli libraries. #326Frédéric Wang1-7/+7
2016-10-12Add ARCHIVE destination for Windows.Frédéric Wang1-1/+5
2016-10-12Use install directories provided by GNUInstallDirs.Frédéric Wang1-3/+3
2016-10-12Also install the libraries and headers when building static libraries.Frédéric Wang1-7/+5