Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Ensure exiv2 build finds the correct exv_conf.h file.
When looking for an include file, the compiler typically looks for the new file in the same directory as the file as it is currently processing. It does this before searching in the list of include file directories. This is causing the compiler to find the exv_conf.h file in mythtv/external/libexiv2/include/exiv2 (the version checked into the MythTV sources), and not the correct version in build-qt5/exiv2-prefix/src/exiv2-build (the one generated by cmake). These files were similar enough to not cause a problem until the recent changes to not compile XMP support. 1) Copy the config.h file to build-qt5/exiv2-prefix/src/exiv2-build, since this is the file that pulls in exv_conf.h. This ensures that when the compiler looks for exv_conf.h, it finds the correct one (which is in the same directory). 2) Add an include of config.h to xmp.cpp. That file doesn't include config.h directly but via another file, which means the wrong config.h file is included and thus the wrong exv_config.h. Adding this additional include forces the include directory search path to be used, and thus the correct config.h/xv_conf.h files are found.
- Loading branch information