-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake support for windows #4411
Conversation
There is an error on travis-ci, could you check that? https://travis-ci.org/cocos2d/cocos2d-x/jobs/14729723 |
Which Platform is that for? EDIT: I realised its linux I'll fix it soon |
@dumganhar fixed ;) |
Thank you. |
option(BUILD_EXTENSIONS "Build extension library" OFF) | ||
option(BUILD_EDITOR_SPINE "Build editor support for spine" OFF) | ||
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" OFF) | ||
option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to set these switch to OFF
by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be best to get the minimal version working on Win Mac and Linux and then enable them as we go.
I can enable them for Linux by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the top level CMakeLists.txt is designed for building all libraries and projects.
All binaries will be placed in cocos2d_root/bin
and all libraries will be placed in cocos2d_root/lib
.
Template will uses the libraries in lib
folder.
Could the template in cocos2d_root/template/multi-platform-cpp/HelloCpp
use the CMakeLists.txt in the top level folder?
Now we only static link the libraries in lib
folder. As I know, add_subdirectory
can't do this, right?
If it could, I think minimal version
you did will make sense.:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I wouldn't use that one, I would create one from scratch in template/multi-platform-cpp/HelloCpp
Only variable it would need is COCOS_HOME directory
That then could be used by project_creator.py
that way the project could be put anywhere in the filesystem not just in the projects folder and still compile
I've reverted the Options for Linux :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great. :)
@martell |
If you have a Ubuntu VM, you could test on it. |
Sorry I don't atm. Just fix HelloCPP and that should do it |
@dumganhar It passed Travis Linux build now |
closed #3328: cmake support for windows
merged. thx. |
closed cocos2d#3328: cmake support for windows
closed cocos2d#3328: cmake support for windows
closed cocos2d#3328: cmake support for windows
closed cocos2d#3328: cmake support for windows
…tive code. Former-commit-id: 3f62369e1d721ad659e91077e0842b9a7858655a
Quickly added cmake support for windows
Tested on Visual Studio 2013
Instructions for Windows
eg. win32-msvc-2013-x86 for visual studio 2013
Have fun
Can I get some feedback please?
I only hacked it together quickly so I want to know does it work for others.
Martell