CMake Support for all platforms

CMake Support for all platforms
0.0 0

#1

Hi,

I wonder if there is any possible way to compile a proyect Cocos2DX under Windows for Visual Studio 2015 with CMake. I tried with the last version, but I find a lot of mistakes. For example:

2> CCApplication-win32.obj: LNK2001: external symbol _GetFileVersionInfoSizeW @ 8 Unsolved
2> CCApplication-win32.obj: LNK2001: external symbol _GetFileVersionInfoW @ 16 Unsolved
2> CCApplication-win32.obj: LNK2001: external symbol _VerQueryValueW @ 16 Unsolved

I have seen that this is because not linkea properly with the Windows library ‘Version.lib’ for example.

I have also seen that in the case of MacOS with CMake have to go by some hacks as add the iconv library, or include for glfw3.

There any way or anyone has been able to compile for three platforms (Windows, Linux, Mac) using CMake?

It is very difficult to work in different operation systems, each with its project.

Maybe it’s something that does not matter, if so I will try myself strive to fix it and send a pull-request.

Thank you very much!


#2

I’m working through a number of issues on my end also. I started development on linux, now trying to get the cmake build happening correctly on windows with mingw64 (so I can continue to work in CLion).

My project has dependencies that also rely on cmake, so maintaining a sln alongside my main cmake build will be quite awkward.

It seems to me that the skeleton sln provided by the cocos cli must be out of step with the cmake win32 target. I’m not yet sure how best to track the drift between the two.

While I’m yet to tackle the OSX build, I’m imagining there will be more of the same there.


#3

VS2017 should improve working with CMake.
https://blogs.msdn.microsoft.com/vcblog/2017/03/07/visual-studio-2017-for-c-developers-you-will-love-it/