On windows mingw platform all executables as a result will be flatc command line utils (((
Because flatbuffers target contains "main" function...
Fix it by not set FLATBUFFERS_LIBRARIES at all (because it header-only library!)
This change allow to include cocos project directory from another CMakeFiles.txt (with add_subdirectory). And will allow anyone to connect cocos as submodule to their project easily.
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.
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
* 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
* 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
* 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)
* 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.