2 Commits

Author SHA1 Message Date
Levi Morrison
9fd8df92ca Export and install CMake targets
The steps to add this functionality are from the cmake tutorial:
https://cmake.org/cmake/help/latest/guide/tutorial/index.html

The include directories being set on the targets is necessary
for dependent targets. There is some redundancy with the
INCLUDE_DIRECTORIES calls alreday present, but I left it alone
to make the PR smaller and more approachable.

The project currently uses mixed cases in functions. This uses
lowercase on calls I touched, as this is what CMake documentation
uses and seems to be the preferred way.

I also started wrapping long lines, as some of the lines I touched
were over 170 characters.

I tested this on both Mac OS 10.15 Catalina and CentOS 7 (with
devtoolset-7) with CMake 3.10.3.
Will work on tests in CI next.
2021-04-12 18:42:47 -06:00
Robert Edmonds
b0e0430d57 build-cmake/: add a new CMakeLists.txt file as a fallback
For certain platforms where autotools is not the preferred build system,
provide a fallback cmake file that can compile protoc-c and a static
library of libprotobuf-c.

Based on the file from alex85k's protobuf-c repository.

(Issue #168.)
2014-09-08 17:05:05 -04:00