Open dynamiccast opened 6 years ago
I don't know if it helps, but in our case, we started by extracting the version (branch_head) and subversion (number of commits since branch head) to use in the xxxConfigVersion.cmake. We would use cmake to create a config file that would contain the version as a C preprocessor define to be used at compilation time. It allowed for a time to have application code that would support multiple webrtc versions by using the following pattern:
Unfortunately, those changes in libwebrtc were not the exception but the normality and the maintenance burden was increasing too quickly. We are now using branches across, i.e. all our projects depending on libwebrtc have a 61, 62, 63, .... branch which are all in sync, and this branches contains code that is aligned with the branch_head version. Made our life easy, and simplified the maintenance A LOT !
WARNING, this breaks backward compatibility. branch-head below 63 will not work.
Not sure how to handle this but webrtc 63 do not work with the cmake script anymore. The WebRTC team has moved all headers from
out/webrtc/src/webrtc
toout/webrtc/src
. This commit install the header from the right location.However,
CMakeModules/Templates/LibWebRTCConfig.cmake.in
has been modified to include both theINSTALL_INCLUDE_DIR
andINSTALL_INCLUDE_DIR/webrtc
. This is because we still want to include webRTC header this way from our program:#include <webrtc/somefile.h>
but then the header from webrtc might include other webrtc header this way#include <someotherfile.h
.I'm not sure how to handle the backward compatibility and the small hack with the include. Because of this I advise not to merge this PR. Someone can still get inspiration from it to make it better though.