Reputation: 1
I am attempting the build the Xerces 3.2.5 library from source for windows per these instructions..
My compiler is Visual Studio 2019. The version is mandated by the application for which I am ultimately developing code for as Its APIs are only certified for that version of VS.
The cmake --build
step fails because multiple files cannot find the Xerces_autoconf_config.hpp
. That file is indeed missing although there is both a Xerces_autoconf_config.hpp.cmake.in
and a Xerces_autoconf_config.hpp.in
which I presume are used by ~something~ in the build chain to generate the missing header.
The failing source files indicate as much,
// If the next line generates an error then you haven't run ./configure
#include <xercesc/util/Xerces_autoconf_config.hpp>
however configure
is a shell script that doesn't run under windows.
STEPS TAKEN:
mkdir build
/ cd build
cmake -Wno-dev -DPROJECT_VERSION=3.2.5 -DCMAKE_INSTALL_PREFIX=G:\libs ..\src
-DPROJECT_VERSION=3.2.5
to the example command otherwise I got errors because the write_basic_package_version_file()
command in CMakeLists.txt was missing the version. It is purely a SWAG that 3.2.5 was in fact the correct value to pass.cmake --build . --config Debug
Typical error message:
C:\Dev\xerces-c-3.2.5\src\xercesc/util/XercesDefs.hpp(46,10): fatal error C1083: Cannot open include file: 'xercesc/util/Xerces_autoconf_config.hpp': No such file or directory
I assume there is something I have to do to have cmake generate the missing header file but I do not know what that is.
Upvotes: 0
Views: 159
Reputation: 1
Those headers are generated in the build tree, not the source tree.
Check the location where the generated project files were placed.
You may have to copy them into the same location as the other (non-generated) headers.
Upvotes: 0