This reverts commit 93f6b67eb2.
Protoc adds already the relative path to the output directory.
Therefore, we have to remove this again from the output directory
to prevent adding it twice.
Without this fix, protobuf_generate() sets the variable _generated_srcs to
${protobuf_generate_PROTOC_OUT_DIR}/${_rel_dir}/${_basename}${_ext}
but generates the files in
${protobuf_generate_PROTOC_OUT_DIR}/${_basename}${_ext}
* CMake: Add comment for CMP0048
* CMake: osx use @rpath/ as target's install name (CMP0042)
On MacoS library should use @rpath/ as prefix path instead of absolute build path
e.g. otool -L libprotobuf.dylib
libprotobuf.dylib:
@rpath/libprotobuf.dylib (...)
...
* CMake: add rpath to target for LINUX and APPLE
For google/or-tools, on windows, we need to use `import "google/protobuf/wrappers.proto";` since we want "optional" int64 and in version3 POD get default value...
-> so we use "google.protobuf.Int64Value" since 0 is a valid value and different from "not set" for our use case.
- Removed the redefination in the atomicword_compat.h. Now Atomic32 will
alwyas be intptr_t in 32bit platforms, the bridge is no longer needed.
- Change NaCl 64bit to use intptr_t instead of int32 for Atomic32,
otherwise AtmoicWord APIs will miss the definations.
After this change, the AtmoicWord will always be either Atomic32 or
Atmoic64 depending on the platforms.
In protobuf-module.cmake: in addition to checking for release or debug
variants of protoc's location we should also check the configuration "noconfig".
VS2017 warns about a few additional things, for example, files that
define no symbols (which is typically the result of a platform specific
ifdef not applying on Windows).
Suppress these warnings so the build is clean on VS2017.