BYVoid / OpenCC

Conversion between Traditional and Simplified Chinese
https://opencc.byvoid.com/
Apache License 2.0
8.5k stars 981 forks source link

Add options for using system versions of libraries #547

Closed Arfrever closed 3 years ago

Arfrever commented 3 years ago

OpenCC build system should provide options for using system versions of libraries. Using of system versions of libraries is preferred by packagers.

This patch adds options:

All options were successfully tested. Default behavior remains unchanged.

(There was BUILD_BUNDLED_LIBMARISA option, but it did not affect call to include_directories(../deps/marisa-0.2.5/include). For consistency with other new options, this option is renamed by this patch.)

Patch does not add new cache variables for directories of headers, since users can easily manually add -I... option to CXXFLAGS if necessary.

If pybind11 CMake modules are located in non-standard location, users can call cmake with -DCMAKE_MODULE_PATH=... option.

Patch: OpenCC-system_libraries.patch.txt

lotem commented 3 years ago

Merged. Thanks.