Hi,
I'm trying to build the C++ connector from source using Visual Studio 2008 Express. I can get it working up to the point of building the libraries (e.g. I have mysqlcppconn.dll and mysqlcppconn-static.lib built OK), but what I'm having problems with is organising the outputs so that debug and release builds do not output to the same paths.
I'd prefer to modify the CMake files and have the files install to the correct location rather than just build and then manually copy, as that will end in mistakes at some point.
I already had to change the cppconn/CMakeLists.txt file so that config.h (as built from config.h.cm) is copied from the build directory rather than the source directory otherwise the INSTALL target fails due to it not finding config.h.
Generating with and without CMAKE_BUILD_TYPE to Debug makes no difference to the output paths or filenames, but maybe that is not meant to apply to the C++ connector? The pdb files are also not copied to the output. I managed to edit the CMakeLists.txt so that libs are separated into debug or opt depending on the CMAKE_BUILD_TYPE setting, however I'd prefer if that could be set in the project configurations rather than having to re-generate between building for debug and release. Is that even possible with cmake?
Before I go too far, is this the correct approach? How is this solved with the official MSI releases for Windows, where I assume these steps need to be done anyway?
Thanks.
I'm trying to build the C++ connector from source using Visual Studio 2008 Express. I can get it working up to the point of building the libraries (e.g. I have mysqlcppconn.dll and mysqlcppconn-static.lib built OK), but what I'm having problems with is organising the outputs so that debug and release builds do not output to the same paths.
I'd prefer to modify the CMake files and have the files install to the correct location rather than just build and then manually copy, as that will end in mistakes at some point.
I already had to change the cppconn/CMakeLists.txt file so that config.h (as built from config.h.cm) is copied from the build directory rather than the source directory otherwise the INSTALL target fails due to it not finding config.h.
Generating with and without CMAKE_BUILD_TYPE to Debug makes no difference to the output paths or filenames, but maybe that is not meant to apply to the C++ connector? The pdb files are also not copied to the output. I managed to edit the CMakeLists.txt so that libs are separated into debug or opt depending on the CMAKE_BUILD_TYPE setting, however I'd prefer if that could be set in the project configurations rather than having to re-generate between building for debug and release. Is that even possible with cmake?
Before I go too far, is this the correct approach? How is this solved with the official MSI releases for Windows, where I assume these steps need to be done anyway?
Thanks.