Running cmake initially generates a multi-configuration windows visual studio 2019 solution and project files which is great. I used a command like this.
cmake -D CMAKE_INSTALL_PREFIX=xerces-c-3.2.4-install `
-Dtranscoder=windows `
-S xerces-c-3.2.4 `
-B xerces-c-3.2.4-build > cmake-configure.txt 2>&1
Now after building and installing the target it always installs to the same location rather than to Debug or Release sub-directories.
cmake --build xerces-c-3.2.4-build --config Debug --target install
Perhaps I can just manually copy the files but I would have thought that the install would know to put the files into an appropriate sub-directory. It makes no sense to me to run the first command twice since it generates all of the projects and configurations the first time. I haven't been able to figure out how to add a suffix to the install prefix variable during a build to accomplish what I want, but is there a way? I'm unsure if this is a xerces-c or cmake question because it could depend on how the xerces-c developers designed the build process.
In a nutshell, I'd like to be able to run the first command once to generate build files. After building each configuration I'd like to install the results to an a separate place (e.g., Debug, Release, RelWithDebug).
I have also tried this, but --prefix doesn't seem to have any effect. cmake --build xerces-c-3.2.4-build --config Release --prefix xerces-c-3.2.4-install\Release --target install