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 unify usage of prebuilt libraries #9177
Cmake unify usage of prebuilt libraries #9177
Conversation
* introduce config variable USE_PREBUILT_LIBS (default: ON). When OFF, cmake will not use prebuilt libs, only try find system installed libraries. * FindGLFW3.cmake now search our prebuilt library (if USE_PREBULT_LIBS) * FindFreetype.cmake also This and next changes should simplify our CMakeLists.txt files and USE_PREBUILT_LIBS config allow external package developers to integrate cocos to their packaging system.
* Introduce config variable USE_WEBP (ON by default, but disabled for unsupported archs WINRT and WP8) * Set CC_USE_WEBP define according to USE_WEBP variable * add WebP include directories to search patch only for libcocos compilation (it not used in public headers)
* cmake/Modules/FindChipmunk.cmake now can find prebuilt chipmunk libs * follow USE_CHIPMUNK variable (although at the moment cocos can't build without chipmunk) * come cleanups and formatting
… lua bindings still fail.
* should be included as simple "tinyxml2.h", but on some files was "tinyxml2/tinyxml2.h", replace this. * Add cmake/Modules/FindTinyXML2.cmake * As tinyxml2 for now has not prebuilt, instead sources included, add their as subdirectory if USE_PREBUILT_LIBS
… other our Find*.cmake modules
…CP_USE_CGPOINTS=0, or chipmunk will try use apple defined geometry types that conflicts with cocos types.
No sure about to remove comment, because it important, but work in this direction in progress now, so I remove it also.
But disable finding until bug with protobuf versions will be resolved.
1. Add cmake module for finding minizip in system 2. Check that system installed minizip recent enough for us 3. As right minizip exists only for MSYS2 (mingw), use our embedded version on all other platforms 4. Correctly include minizip as <minizip/unzip.h> if it is found from system (make it compatible to current build system, so by default all should stay same) 5. Remove one unused include of unzip.h
…NO (some additional libs hardcoded still)
…-config first, this teoretically can find also dependant libs).
Test another way to customize our prebuilt paths... Cleanups.
…penal includes as "#include <al.h>"
…d BUILD_SHARED_LIBS
…tatic library in some find* modules we try to use pkg-config first, it is chance to get dependency info
… can not link this libs). Eliminate some Find* modules, we can tune prebuilts without modify their code.
Now build system looks more maintanable. I test with mac, going to test with other platforms. * All prebuilt libs config moved to cmake/Modules/CocosUsePrebuiltLibs.cmake * Wrap plain find_package to our cocos_find_package. It will not try to call find_package if USE_PREBUILT_LIBS and <pkg>_FOUND set to true. * Other small fixes.
Conflicts: CMakeLists.txt
Regarding number 7. |
* v3: Use version 22 for external dependencies
…stream v3 I fetched some strange commit for that module)
Thank you @martell! So when new library will be committed, we will simply remove protobuf from deps. |
…ibraries Cmake unify usage of prebuilt libraries
Thanks, great work! |
…built-libraries Cmake unify usage of prebuilt libraries
@vovkasm |
@AndyQue, yes... Sorry for that ( |
@vovkasm And here is the error message link: http://115.28.72.132:8000/job/cocos-2dx-pull-request-build/6043/node=linux_centos/console |
Thanks, for information. @AndyQue, can you please in addition say, how dependencies installed to Linux CI? Are they preinstalled or some script exists? |
Done: #9218 If needed, I have shell script, that install all deps and requirements on centos 6.5. I used it to configure virtualbox vm from vagrant. |
Cmake build system: unify usage of prebuilt libraries
This patch unify usage of external libs while building process. And should simplify future development. Also some small fixes that I was need to include because can’t test without them.
-DUSE_PREBUILT_LIBS=NO
to force finding external deps in system (as other soft with cmake Find* modules)cocos/editor-support/cocostudio/CSParseBinary.pb.cc
)This can be tested on:
Lua tests currently build, but runs for me only on some configs (but this can be fixed in next patches).