Working with vcxproj2cmake
Creating Cross-platform code
The next problem I encountered was resolved by this Stack Overflow post: Why does MSVC Let me do this. I was essentially passing an anonymous object to a function. It was a little confusing to track down as it wasn't a simple example:
They were the only real code issues that I faced, the rest was all about learning CMake.
I had quite a bit of trouble getting used to how CMake works, specifically with include and library paths and also using the if(UNIX) branches for OS specific target_link_libraries. I finally managed to get CMake working and now I only had to deal with the make compilation issues.
What I hadn't realised is that fmod had changed significantly since I got the library for Windows so then I had to adapt the code to use the new library.
Once I had managed this I then created a Test application to play a sound. So it was all quite easy I just had problems with:
- code issues
- cmake issues
- library compatibility issues.
- and then more code issues due to the new library.
On a serious note it wasn't half as bad as I thought, and I've learnt much more about CMake. The next things I will need to look at are:
- Adding CMake Dependencies i.e. JBEngine Library requires all the other smaller Libraries such as Sound, Maths, Renderer etc.
- Ensuring I haven't broken anything in Visual Studio whilst messing around with the project files.
- Looking into Visual Studio Project/Solution Generation from CMake.