| @@ -0,0 +1,86 @@ | ||
| #include "HelloWorldScene.h" | ||
|
|
||
| USING_NS_CC; | ||
|
|
||
| Scene* HelloWorld::createScene() | ||
| { | ||
| // 'scene' is an autorelease object | ||
| auto scene = Scene::create(); | ||
|
|
||
| // 'layer' is an autorelease object | ||
| auto layer = HelloWorld::create(); | ||
|
|
||
| // add layer as a child to scene | ||
| scene->addChild(layer); | ||
|
|
||
| // return the scene | ||
| return scene; | ||
| } | ||
|
|
||
| // on "init" you need to initialize your instance | ||
| bool HelloWorld::init() | ||
| { | ||
| ////////////////////////////// | ||
| // 1. super init first | ||
| if ( !Layer::init() ) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| Size visibleSize = Director::getInstance()->getVisibleSize(); | ||
| Vec2 origin = Director::getInstance()->getVisibleOrigin(); | ||
|
|
||
| ///////////////////////////// | ||
| // 2. add a menu item with "X" image, which is clicked to quit the program | ||
| // you may modify it. | ||
|
|
||
| // add a "close" icon to exit the progress. it's an autorelease object | ||
| auto closeItem = MenuItemImage::create( | ||
| "CloseNormal.png", | ||
| "CloseSelected.png", | ||
| CC_CALLBACK_1(HelloWorld::menuCloseCallback, this)); | ||
|
|
||
| closeItem->setPosition(Vec2(origin.x + visibleSize.width - closeItem->getContentSize().width/2 , | ||
| origin.y + closeItem->getContentSize().height/2)); | ||
|
|
||
| // create menu, it's an autorelease object | ||
| auto menu = Menu::create(closeItem, NULL); | ||
| menu->setPosition(Vec2::ZERO); | ||
| this->addChild(menu, 1); | ||
|
|
||
| ///////////////////////////// | ||
| // 3. add your codes below... | ||
|
|
||
| // add a label shows "Hello World" | ||
| // create and initialize a label | ||
|
|
||
| auto label = Label::createWithTTF("Hello World", "fonts/Marker Felt.ttf", 24); | ||
|
|
||
| // position the label on the center of the screen | ||
| label->setPosition(Vec2(origin.x + visibleSize.width/2, | ||
| origin.y + visibleSize.height - label->getContentSize().height)); | ||
|
|
||
| // add the label as a child to this layer | ||
| this->addChild(label, 1); | ||
|
|
||
| // add "HelloWorld" splash screen" | ||
| auto sprite = Sprite::create("HelloWorld.png"); | ||
|
|
||
| // position the sprite on the center of the screen | ||
| sprite->setPosition(Vec2(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); | ||
|
|
||
| // add the sprite as a child to this layer | ||
| this->addChild(sprite, 0); | ||
|
|
||
| return true; | ||
| } | ||
|
|
||
|
|
||
| void HelloWorld::menuCloseCallback(Ref* pSender) | ||
| { | ||
| Director::getInstance()->end(); | ||
|
|
||
| #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) | ||
| exit(0); | ||
| #endif | ||
| } |
| @@ -0,0 +1,22 @@ | ||
| #ifndef __HELLOWORLD_SCENE_H__ | ||
| #define __HELLOWORLD_SCENE_H__ | ||
|
|
||
| #include "cocos2d.h" | ||
|
|
||
| class HelloWorld : public cocos2d::Layer | ||
| { | ||
| public: | ||
| // there's no 'id' in cpp, so we recommend returning the class instance pointer | ||
| static cocos2d::Scene* createScene(); | ||
|
|
||
| // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone | ||
| virtual bool init(); | ||
|
|
||
| // a selector callback | ||
| void menuCloseCallback(cocos2d::Ref* pSender); | ||
|
|
||
| // implement the "static create()" method manually | ||
| CREATE_FUNC(HelloWorld); | ||
| }; | ||
|
|
||
| #endif // __HELLOWORLD_SCENE_H__ |
| @@ -0,0 +1,380 @@ | ||
| #/**************************************************************************** | ||
| # Copyright (c) 2013 cocos2d-x.org | ||
| # Copyright (c) 2014 martell malone | ||
| # | ||
| # http://www.cocos2d-x.org | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
|
|
||
| # The above copyright notice and this permission notice shall be included in | ||
| # all copies or substantial portions of the Software. | ||
|
|
||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| # THE SOFTWARE. | ||
| # ****************************************************************************/ | ||
|
|
||
| cmake_minimum_required(VERSION 2.8) | ||
| # It ensures that when Find*.cmake files included from cmake's Modules dir | ||
| # include another *.cmake file with relative path, that file will be included | ||
| # also from cmake's Modules dir, to not clash with per-project files. | ||
| cmake_policy(SET CMP0017 NEW) | ||
|
|
||
| # Use new behaviour with cmake >= 3.1: | ||
| # Only interpret if() arguments as variables or keywords when unquoted. | ||
| if(CMAKE_VERSION VERSION_GREATER 3.1) | ||
| cmake_policy(SET CMP0054 NEW) | ||
| endif() | ||
|
|
||
| project (Cocos2d-X) | ||
|
|
||
| # The version number | ||
| set(COCOS2D_X_VERSION 3.7.1) | ||
|
|
||
| set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/") | ||
| include(CocosBuildHelpers) | ||
|
|
||
| message(${BUILDING_STRING}) | ||
|
|
||
| set(USE_WEBP_DEFAULT ON) | ||
| if(WINRT OR WP8) | ||
| set(USE_WEBP_DEFAULT OFF) | ||
| endif() | ||
|
|
||
| set(USE_PREBUILT_LIBS_DEFAULT ON) | ||
| if(MINGW) | ||
| set(USE_PREBUILT_LIBS_DEFAULT OFF) | ||
| endif() | ||
|
|
||
| set(BUILD_CPP_TESTS_DEFAULT ON) | ||
| set(BUILD_LUA_LIBS_DEFAULT ON) | ||
| set(BUILD_LUA_TESTS_DEFAULT ON) | ||
| set(BUILD_JS_LIBS_DEFAULT ON) | ||
| set(BUILD_JS_TESTS_DEFAULT ON) | ||
| # TODO: fix test samples for MSVC | ||
| if(MSVC) | ||
| set(BUILD_CPP_TESTS_DEFAULT OFF) | ||
| set(BUILD_LUA_LIBS_DEFAULT OFF) | ||
| set(BUILD_LUA_TESTS_DEFAULT OFF) | ||
| set(BUILD_JS_LIBS_DEFAULT OFF) | ||
| set(BUILD_JS_TESTS_DEFAULT OFF) | ||
| endif() | ||
|
|
||
| option(USE_CHIPMUNK "Use chipmunk for physics library" ON) | ||
| option(USE_BOX2D "Use box2d for physics library" OFF) | ||
| option(USE_BULLET "Use bullet for physics3d library" ON) | ||
| option(USE_RECAST "Use Recast for navigation mesh" ON) | ||
| option(USE_WEBP "Use WebP codec" ${USE_WEBP_DEFAULT}) | ||
| option(BUILD_SHARED_LIBS "Build shared libraries" OFF) | ||
| option(DEBUG_MODE "Debug or release?" ON) | ||
| option(BUILD_EXTENSIONS "Build extension library" ON) | ||
| option(BUILD_EDITOR_SPINE "Build editor support for spine" ON) | ||
| option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON) | ||
| option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON) | ||
| option(BUILD_CPP_TESTS "Build TestCpp samples" ${BUILD_CPP_TESTS_DEFAULT}) | ||
| option(BUILD_LUA_LIBS "Build lua libraries" ${BUILD_LUA_LIBS_DEFAULT}) | ||
| option(BUILD_LUA_TESTS "Build TestLua samples" ${BUILD_LUA_TESTS_DEFAULT}) | ||
| option(BUILD_JS_LIBS "Build js libraries" ${BUILD_JS_LIBS_DEFAULT}) | ||
| option(BUILD_JS_TESTS "Build TestJS samples" ${BUILD_JS_TESTS_DEFAULT}) | ||
| option(USE_PREBUILT_LIBS "Use prebuilt libraries in external directory" ${USE_PREBUILT_LIBS_DEFAULT}) | ||
|
|
||
| if(USE_PREBUILT_LIBS AND MINGW) | ||
| message(FATAL_ERROR "Prebuilt windows libs can't be used with mingw, please use packages.") | ||
| endif() | ||
|
|
||
| if(DEBUG_MODE) | ||
| set(CMAKE_BUILD_TYPE DEBUG) | ||
| else(DEBUG_MODE) | ||
| set(CMAKE_BUILD_TYPE RELEASE) | ||
| endif(DEBUG_MODE) | ||
|
|
||
| set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCOCOS2D_DEBUG=1") | ||
| set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) | ||
|
|
||
| # Compiler options | ||
| if(MSVC) | ||
| ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS | ||
| -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710 | ||
| -wd4514 -wd4056 -wd4996 -wd4099) | ||
|
|
||
| # Use inline debug info (/Z7) format. Or internal error may occur. | ||
| # Errors looks like: "xmemory0(592): error C3130: Internal Compiler Error: failed to write injected code block to PDB" | ||
| foreach(lang C CXX) | ||
| string(REGEX REPLACE "/Z[iI7]" "" CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG}") | ||
| set(CMAKE_${lang}_FLAGS_DEBUG "${CMAKE_${lang}_FLAGS_DEBUG} /Z7") | ||
| endforeach() | ||
|
|
||
| else() | ||
| set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -DCOCOS2D_DEBUG=1") | ||
| set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -std=c99") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -std=c++11 -Wno-deprecated-declarations -Wno-reorder") | ||
| if(CLANG) | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") | ||
| endif() | ||
| endif(MSVC) | ||
|
|
||
| set(COCOS_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external) | ||
|
|
||
| # Some macro definitions | ||
| if(WINDOWS) | ||
|
|
||
| if(BUILD_SHARED_LIBS) | ||
| ADD_DEFINITIONS (-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL) | ||
| else() | ||
| ADD_DEFINITIONS (-DCC_STATIC) | ||
| endif() | ||
|
|
||
| ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32) | ||
| set(PLATFORM_FOLDER win32) | ||
| elseif(MACOSX OR APPLE) | ||
| ADD_DEFINITIONS (-DCC_TARGET_OS_MAC) | ||
| ADD_DEFINITIONS (-DUSE_FILE32API) | ||
| set(PLATFORM_FOLDER mac) | ||
| elseif(LINUX) | ||
| ADD_DEFINITIONS(-DLINUX) | ||
| set(PLATFORM_FOLDER linux) | ||
| elseif(ANDROID) | ||
| ADD_DEFINITIONS (-DUSE_FILE32API) | ||
| set(PLATFORM_FOLDER android) | ||
| else() | ||
| message( FATAL_ERROR "Unsupported platform, CMake will exit" ) | ||
| endif() | ||
|
|
||
| if(MINGW) | ||
| #add_definitions(-DGLEW_STATIC) | ||
| add_definitions(-D__SSIZE_T) | ||
|
|
||
| if(CLANG) | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions ") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions ") | ||
| endif() | ||
| endif() | ||
|
|
||
| # architecture | ||
| if ( CMAKE_SIZEOF_VOID_P EQUAL 8 ) | ||
| set(ARCH_DIR "64-bit") | ||
| elseif ( CMAKE_SIZEOF_VOID_P EQUAL 4 ) | ||
| set(ARCH_DIR "32-bit") | ||
| else() | ||
| message( FATAL_ERROR "Unsupported architecture, CMake will exit" ) | ||
| endif() | ||
|
|
||
| include_directories( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/cocos | ||
| ${CMAKE_CURRENT_SOURCE_DIR} | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/deprecated | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/cocos/platform | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/extensions | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/external | ||
| ) | ||
|
|
||
| if(USE_PREBUILT_LIBS) | ||
| include(CocosUsePrebuiltLibs) | ||
| endif() | ||
|
|
||
| # desktop platforms | ||
| if(LINUX OR MACOSX OR WINDOWS) | ||
| cocos_find_package(OpenGL OPENGL REQUIRED) | ||
|
|
||
| if(LINUX OR WINDOWS) | ||
| cocos_find_package(GLEW GLEW REQUIRED) | ||
| #TODO: implement correct schema for pass cocos2d specific requirements to projects | ||
| include_directories(${GLEW_INCLUDE_DIRS}) | ||
| endif() | ||
|
|
||
| cocos_find_package(GLFW3 GLFW3 REQUIRED) | ||
| include_directories(${GLFW3_INCLUDE_DIRS}) | ||
|
|
||
| if(LINUX) | ||
| set(CMAKE_THREAD_PREFER_PTHREAD TRUE) | ||
| find_package(Threads REQUIRED) | ||
| set(THREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) | ||
|
|
||
| cocos_find_package(FMODEX FMODEX REQUIRED) | ||
| cocos_find_package(Fontconfig FONTCONFIG REQUIRED) | ||
| endif() | ||
|
|
||
| if(WINDOWS) | ||
| cocos_find_package(Vorbis VORBIS REQUIRED) | ||
| cocos_find_package(MPG123 MPG123 REQUIRED) | ||
| cocos_find_package(OpenAL OPENAL REQUIRED) | ||
| # because FindOpenAL.cmake set include dir for '#include <al.h>' for portability (not for '#include <AL/al.h>' | ||
| set(OPENAL_DEFINITIONS "-DOPENAL_PLAIN_INCLUDES") | ||
| endif() | ||
| endif(LINUX OR MACOSX OR WINDOWS) | ||
|
|
||
| # Freetype required on all platforms | ||
| cocos_find_package(Freetype FREETYPE REQUIRED) | ||
|
|
||
| # WebP required if used | ||
| if(USE_WEBP) | ||
| cocos_find_package(WebP WEBP REQUIRED) | ||
| endif(USE_WEBP) | ||
|
|
||
| # Chipmunk | ||
| if(USE_CHIPMUNK) | ||
| cocos_find_package(Chipmunk CHIPMUNK REQUIRED) | ||
| add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=1) | ||
| if(IOS OR MACOSX) | ||
| # without this chipmunk will try to use apple defined geometry types, that conflicts with cocos | ||
| add_definitions(-DCP_USE_CGPOINTS=0) | ||
| endif() | ||
| else(USE_CHIPMUNK) | ||
| add_definitions(-DCC_USE_PHYSICS=0) | ||
| endif(USE_CHIPMUNK) | ||
|
|
||
| # Box2d (not prebuilded, exists as source) | ||
| if(USE_BOX2D) | ||
| if(USE_PREBUILT_LIBS) | ||
| add_subdirectory(external/Box2D) | ||
| set(Box2D_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/box2d/include) | ||
| set(Box2D_LIBRARIES box2d) | ||
| else() | ||
| find_package(Box2D REQUIRED CONFIG) | ||
| # actually Box2D in next line is not a library, it is target exported from Box2DConfig.cmake | ||
| set(Box2D_LIBRARIES Box2D) | ||
| endif() | ||
| message(STATUS "Box2D include dirs: ${Box2D_INCLUDE_DIRS}") | ||
| add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=1) | ||
| else() | ||
| add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=0) | ||
| endif(USE_BOX2D) | ||
|
|
||
| # Bullet (not prebuilded, exists as source) | ||
| if(USE_BULLET) | ||
| if(USE_PREBUILT_LIBS) | ||
| add_subdirectory(external/bullet) | ||
| set(BULLET_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet) | ||
| set(BULLET_LIBRARIES bullet) | ||
| else() | ||
| cocos_find_package(bullet BULLET REQUIRED) | ||
| set(BULLET_LIBRARIES bullet) | ||
| endif() | ||
| message(STATUS "Bullet include dirs: ${BULLET_INCLUDE_DIRS}") | ||
| add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=1) | ||
| add_definitions(-DCC_USE_PHYSICS=1) | ||
| else() | ||
| add_definitions(-DCC_ENABLE_BULLET_INTEGRATION=0) | ||
| add_definitions(-DCC_USE_3D_PHYSICS=0) | ||
| endif(USE_BULLET) | ||
|
|
||
| # Recast (not prebuilded, exists as source) | ||
| if(USE_RECAST) | ||
| if(USE_PREBUILT_LIBS) | ||
| add_subdirectory(external/recast) | ||
| set(RECAST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/recast) | ||
| set(RECAST_LIBRARIES recast) | ||
| else() | ||
| cocos_find_package(recast RECAST REQUIRED) | ||
| set(RECAST_LIBRARIES recast) | ||
| endif() | ||
| message(STATUS "Recast include dirs: ${RECAST_INCLUDE_DIRS}") | ||
| add_definitions(-DCC_USE_NAVMESH=1) | ||
| else() | ||
| add_definitions(-DCC_USE_NAVMESH=0) | ||
| endif(USE_RECAST) | ||
|
|
||
| # Tinyxml2 (not prebuilded, exists as source) | ||
| if(USE_PREBUILT_LIBS) | ||
| add_subdirectory(external/tinyxml2) | ||
| set(TinyXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinyxml2) | ||
| set(TinyXML2_LIBRARIES tinyxml2) | ||
| else() | ||
| cocos_find_package(TinyXML2 TinyXML2 REQUIRED) | ||
| endif() | ||
| message(STATUS "TinyXML2 include dirs: ${TinyXML2_INCLUDE_DIRS}") | ||
|
|
||
| # libjpeg | ||
| cocos_find_package(JPEG JPEG REQUIRED) | ||
| cocos_find_package(ZLIB ZLIB REQUIRED) | ||
|
|
||
| # minizip (we try to migrate to minizip from https://github.com/nmoinvaz/minizip) | ||
| # only msys2 currently provides package for this variant, all other | ||
| # dists have packages from zlib, thats very old for us. | ||
| # moreover our embedded version modified to quick provide | ||
| # functionality needed by cocos. | ||
| if(USE_PREBUILT_LIBS OR NOT MINGW) | ||
| #TODO: hack! should be in external/unzip/CMakeLists.txt | ||
| include_directories(${ZLIB_INCLUDE_DIRS}) | ||
| add_subdirectory(external/unzip) | ||
| set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/unzip ${ZLIB_INCLUDE_DIRS}) | ||
| set(MINIZIP_LIBRARIES unzip ${ZLIB_LIBRARIES}) | ||
| message(STATUS "MINIZIP include dirs: ${MINIZIP_INCLUDE_DIRS}") | ||
| else() | ||
| cocos_find_package(MINIZIP MINIZIP REQUIRED) | ||
| # double check that we have needed functions | ||
| include(CheckLibraryExists) | ||
| check_library_exists(${MINIZIP_LIBRARIES} "unzGoToFirstFile2" "" MINIZIP_HAS_GOTOFIRSTFILE2) | ||
| if(NOT MINIZIP_HAS_GOTOFIRSTFILE2) | ||
| message(FATAL_ERROR "Minizip library on you system very old. Please use recent version from https://github.com/nmoinvaz/minizip or enable USE_PREBUILT_LIBS") | ||
| endif() | ||
| add_definitions(-DMINIZIP_FROM_SYSTEM) | ||
| endif() | ||
|
|
||
| cocos_find_package(PNG PNG REQUIRED) | ||
| cocos_find_package(TIFF TIFF REQUIRED) | ||
| cocos_find_package(WEBSOCKETS WEBSOCKETS REQUIRED) | ||
| cocos_find_package(CURL CURL REQUIRED) | ||
|
|
||
| # flatbuffers | ||
| if(USE_PREBUILT_LIBS) | ||
| add_subdirectory(external/flatbuffers) | ||
| set(FLATBUFFERS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external) | ||
| message(STATUS "Flatbuffers include dirs: ${FLATBUFFERS_INCLUDE_DIRS}") | ||
| else() | ||
| cocos_find_package(flatbuffers flatbuffers REQUIRED) | ||
| endif() | ||
|
|
||
| # xxhash | ||
| if(USE_PREBUILT_LIBS) | ||
| add_subdirectory(external/xxhash) | ||
| set(XXHASH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/xxhash) | ||
| set(XXHASH_LIBRARIES xxhash) | ||
| else() | ||
| cocos_find_package(xxhash xxhash REQUIRED) | ||
| endif() | ||
| # libcocos2d.a | ||
| add_subdirectory(cocos) | ||
|
|
||
| # build cpp tests | ||
| if(BUILD_CPP_TESTS) | ||
| add_subdirectory(tests/cpp-empty-test) | ||
| add_subdirectory(tests/cpp-tests) | ||
| endif(BUILD_CPP_TESTS) | ||
|
|
||
| ## Scripting | ||
| if(BUILD_LUA_LIBS) | ||
| add_subdirectory(cocos/scripting/lua-bindings) | ||
|
|
||
| # build lua tests | ||
| if(BUILD_LUA_TESTS) | ||
| add_subdirectory(tests/lua-tests/project) | ||
| add_subdirectory(tests/lua-empty-test/project) | ||
| endif(BUILD_LUA_TESTS) | ||
|
|
||
| endif(BUILD_LUA_LIBS) | ||
|
|
||
| ## JS | ||
| if(BUILD_JS_LIBS) | ||
| link_directories( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/external/spidermonkey/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} | ||
| ) | ||
|
|
||
| add_subdirectory(cocos/scripting/js-bindings) | ||
|
|
||
| # build js tests | ||
| if(BUILD_JS_TESTS) | ||
| add_subdirectory(tests/js-tests/project) | ||
| endif(BUILD_JS_TESTS) | ||
|
|
||
| endif(BUILD_JS_LIBS) |
| @@ -0,0 +1,40 @@ | ||
|
|
||
| CMake Build Instructions | ||
|
|
||
| NB. Depending on your host system your Generator flag -G may be different | ||
|
|
||
| Typical -G options | ||
| For using gcc and clang from a makefile | ||
|
|
||
| msys2 = "MSYS Makefiles" | ||
| windows = "MinGW Makefiles" | ||
| nix and mac = "Unix Makefiles" | ||
|
|
||
| For using and editor such as Visual Studio or xcode or sublime text there are different flags | ||
|
|
||
| To like all available flags for your system run | ||
|
|
||
| cmake --help | ||
|
|
||
|
|
||
| More Examples | ||
|
|
||
| mac build Instructions | ||
|
|
||
| cd cocos2d-x | ||
| mkdir macbuild && cd macbuild | ||
| cmake -G "Unix Makefiles" -DBUILD_CPP_TESTS=OFF -DBUILD_LUA_LIBS=OFF .. | ||
|
|
||
| Android Build Instructions | ||
|
|
||
| cd cocos2d-x | ||
| mkdir androidbuild && cd androidbuild | ||
| cmake -G"MSYS Makefiles" -DANDROID_NDK=/path/to/android-ndk-r9d -DANDROID_NATIVE_API_LEVEL=android-9 -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake .. | ||
|
|
||
| mingw64 with msys2 build Instructions | ||
|
|
||
| cd cocos2d-x | ||
| mkdir mingwbuild && cd mingwbuild | ||
| cmake -G "MSYS Makefiles" -DBUILD_CPP_TESTS=OFF -DBUILD_LUA_LIBS=OFF .. | ||
|
|
||
| todo: structure this document in markdown with better examples and more details |
| @@ -0,0 +1,281 @@ | ||
| <img src="http://www.cocos2d-x.org/attachments/801/cocos2dx_portrait.png" width=200> | ||
|
|
||
|
|
||
| cocos2d-x | ||
| ========= | ||
|
|
||
| | |iOS|Mac|Linux|Win32|Android|Win8.1-Universal| | ||
| | ----|----|----- | ---|----|------|---| | ||
| |v3|[](http://45.56.80.45:8080/job/daily-build-v3/node=ios)|[](http://45.56.80.45:8080/job/daily-build-v3/node=mac)|[](http://45.56.80.45:8080/job/daily-build-v3/node=linux)|[](http://45.56.80.45:8080/job/daily-build-v3/node=win32)|[](http://45.56.80.45:8080/job/daily-build-v3/node=android)|[](http://45.56.80.45:8080/job/daily-build-v3/node=windows-universal)| | ||
| |v4|[](http://45.56.80.45:8080/job/daily-build-v4/node=ios)|[](http://45.56.80.45:8080/job/daily-build-v4/node=mac)|[](http://45.56.80.45:8080/job/daily-build-v4/node=linux)|[](http://45.56.80.45:8080/job/daily-build-v4/node=win32)|[](http://45.56.80.45:8080/job/daily-build-v4/node=android)|[](http://45.56.80.45:8080/job/daily-build-v4/node=windows-universal)| | ||
|
|
||
|
|
||
|
|
||
| [cocos2d-x][1] is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. | ||
| It is based on [cocos2d-iphone][2], but instead of using Objective-C, it uses C++. | ||
| It works on iOS, Android, Windows Phone and Store Apps, OS X, Windows, Linux and Web platforms. | ||
|
|
||
| cocos2d-x is: | ||
|
|
||
| * Fast | ||
| * Free | ||
| * Easy to use | ||
| * Community Supported | ||
|
|
||
| Git user attention | ||
| ----------------------- | ||
|
|
||
| 1. Clone the repo from GitHub. | ||
|
|
||
| $ git clone https://github.com/cocos2d/cocos2d-x.git | ||
|
|
||
| 2. After cloning the repo, please execute `download-deps.py` to download and install dependencies. | ||
|
|
||
| $ cd cocos2d-x | ||
| cocos2d-x $ python download-deps.py | ||
|
|
||
| 3. After running `download-deps.py`. | ||
|
|
||
| cocos2d-x $ git submodule update --init | ||
|
|
||
| Download stable versions | ||
| ----------------------- | ||
|
|
||
| * [Cocos2d-x stable versions](http://www.cocos2d-x.org/download) | ||
| * [Cocos2d-JS Lite version](http://www.cocos2d-x.org/filecenter/jsbuilder) | ||
|
|
||
| How to start a new game | ||
| ----------------------- | ||
|
|
||
| 1. Download the code from [cocos2d download site][4] | ||
| 2. Run `setup.py` | ||
| 3. Run the `cocos` script | ||
|
|
||
| Example: | ||
|
|
||
| $ cd cocos2d-x | ||
| $ ./setup.py | ||
| $ source FILE_TO_SAVE_SYSTEM_VARIABLE | ||
| $ cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR | ||
| $ cd NEW_PROJECTS_DIR/MyGame | ||
|
|
||
| You can also create a JS project or Lua project with `-l js` or `-l lua`. | ||
|
|
||
| ### Build and run a new project for Android ### | ||
|
|
||
| $ cocos run -p android -j 4 | ||
|
|
||
| ### Build and run a new project for iOS ### | ||
|
|
||
| $ cocos run -p ios | ||
|
|
||
| ### Build and run a new project for OSX ### | ||
|
|
||
| $ cocos run -p mac | ||
|
|
||
| ### Build and run a new project for Linux ### | ||
|
|
||
| If you never run cocos2d-x on Linux, you need to install all dependencies by the | ||
| script in **cocos2d/build/install-deps-linux.sh** | ||
|
|
||
| $ cd cocos2d-x/build | ||
| $ ./install-deps-linux.sh | ||
|
|
||
| Then | ||
|
|
||
| $ cd NEW_PROJECTS_DIR/MyGame | ||
| $ cocos run -p linux | ||
|
|
||
| Run | ||
|
|
||
| $ bin/MyGame | ||
|
|
||
| ### Build and run new project for win32 ### | ||
|
|
||
| $ cocos run -p win32 | ||
|
|
||
| ### Build and run new project for Windows 8.1/10.0 and Windows Phone 8.1/10.0 ### | ||
|
|
||
| $ cocos new MyGame -p com.your_company.mygame -l cpp -d projects | ||
|
|
||
| * Visual Studio 2013 Update 4 or later is required for Windows 8.1 Universal Apps | ||
|
|
||
| * Visual Studio 2015 RC and Windows 10.0 (build 10074 or higher) is required for Windows 10.0 UWP Apps | ||
|
|
||
| Starting with Cocos2d-x v3.3, you can create Windows 8.1 Universal Apps (Windows Store and Windows Phone 8.1). | ||
| Starting with Cocos2d-x v3.6 you can create Windows 10.0 UWP Apps (Windows Store and Windows Phone 10.0). | ||
| Starting with Cocos2d-x v3.6 there will no longer be support for Windows Phone 8.0. | ||
|
|
||
| See more info on How to install and Create games on Windows RT (Windows and Windows Phone 8.1) at http://msopentech.github.io/cocos2d-x/ | ||
|
|
||
| ### Build and run new project for web ### | ||
|
|
||
| Only JS project can be published to web platforms, so you will need to create a JS project first: | ||
|
|
||
| $ cocos new -l js WebGame | ||
|
|
||
| Then you can run your game in a web browser: | ||
|
|
||
| $ cocos run -p web | ||
|
|
||
| Or you can publish your game to `publish/html5/` folder: | ||
|
|
||
| $ cocos run -p web -m release [--advanced] | ||
|
|
||
| Documentations and samples | ||
| ------------- | ||
|
|
||
| * [Online API Reference](http://cocos2d-x.org/wiki/Reference) _Note that Cocos2d-x and Cocos2d-JS have different API set_ | ||
| * [Programmers Guide](http://cocos2d-x.org/programmersguide/) | ||
| * [Temporary Cocos2d-JS documents](http://cocos2d-x.org/docs/manual/framework/html5/en) | ||
| * [Latest Release Note](https://github.com/cocos2d/cocos2d-x/blob/v3/docs/RELEASE_NOTES.md) | ||
| * [Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG) | ||
| * [Cocos2d sample games](https://github.com/cocos2d/cocos2d-x-samples) _More samples will be added in v3.8_ | ||
|
|
||
| Main features | ||
| ------------- | ||
| * Scene management (workflow) | ||
| * Transitions between scenes | ||
| * Sprites and Sprite Sheets | ||
| * Effects: Lens, Ripple, Waves, Liquid, etc. | ||
| * Actions (behaviours): | ||
| * Trasformation Actions: Move, Rotate, Scale, Fade, Tint, etc. | ||
| * Composable actions: Sequence, Spawn, Repeat, Reverse | ||
| * Ease Actions: Exp, Sin, Cubic, Elastic, etc. | ||
| * Misc actions: CallFunc, OrbitCamera, Follow, Tween | ||
| * Basic menus and buttons | ||
| * Integrated with physics engines: [Box2d][5] and [Chipmunk][6] | ||
| * Particle system | ||
| * Skeleton Animations: [Spine][7] and Armature support | ||
| * Fonts: | ||
| * Fast font rendering using Fixed and Variable width fonts | ||
| * Support for .ttf fonts | ||
| * Tile Map support: Orthogonal, Isometric and Hexagonal | ||
| * Parallax scrolling | ||
| * Motion Streak | ||
| * Render To Texture | ||
| * Touch/Accelerometer on mobile devices | ||
| * Touch/Mouse/Keyboard on desktop | ||
| * Sound Engine support (CocosDenshion library) based on OpenAL | ||
| * Integrated Slow motion/Fast forward | ||
| * Fast and compressed textures: PVR compressed and uncompressed textures, ETC1 compressed textures, and more | ||
| * Resolution Independent | ||
| * Language: C++, with Lua and JavaScript bindings | ||
| * Open Source Commercial Friendly(MIT): Compatible with open and closed source projects | ||
| * OpenGL ES 2.0 (mobile) / OpenGL 2.1 (desktop) based | ||
|
|
||
| Build Requirements | ||
| ------------------ | ||
|
|
||
| * Mac OS X 10.7+, Xcode 5.1+ | ||
| * or Ubuntu 12.10+, CMake 2.6+ | ||
| * or Windows 7+, VS 2013+ | ||
| * Python 2.7.5 | ||
| * NDK r10c+ is required to build Android games | ||
| * Windows Phone/Store 8.1 VS 2013 Update 4+ | ||
| * JRE or JDK 1.6+ is required for web publishing | ||
|
|
||
| Runtime Requirements | ||
| -------------------- | ||
| * iOS 5.0+ for iPhone / iPad games | ||
| * Android 2.3+ for Android games | ||
| * Windows 8.1 for Windows Phone/Store 8.1 games | ||
| * Windows 10.0 for Windows Phone/Store 10.0 games | ||
| * OS X v10.6+ for Mac games | ||
| * Windows 7+ for Win games | ||
| * Modern browsers and IE 9+ for web games | ||
|
|
||
| Running Tests | ||
| -------------------- | ||
|
|
||
| Select the test you want from Xcode Scheme chooser. | ||
|
|
||
| * Cocos Console | ||
|
|
||
| ``` | ||
| // Enter cpp test folder | ||
| cd tests/cpp-tests | ||
| // Or enter js test folder | ||
| cd tests/js-tests | ||
| // Or enter lua test folder | ||
| cd tests/lua-tests | ||
| // Compile or run test case | ||
| cocos compile -p ios|mac|android|win32|win8_1|metro|web -m debug|release | ||
| cocos run -p ios|mac|android|win32|win8_1|metro|web -m debug|release | ||
| ``` | ||
|
|
||
| * For OS X / iOS | ||
|
|
||
| ``` | ||
| $ cd cocos2d-x/build | ||
| $ open cocos2d_tests.xcodeproj | ||
| ``` | ||
|
|
||
| * For Linux | ||
|
|
||
| ``` | ||
| $ cd cocos2d-x/build | ||
| $ ./install-deps-linux.sh | ||
| $ cmake .. | ||
| $ make | ||
| ``` | ||
|
|
||
| Run Samples | ||
|
|
||
| ``` | ||
| $ bin/cpp-empty-test/cpp-empty-test | ||
| or | ||
| $ bin/lua-empty-test/lua-empty-test | ||
| ``` | ||
|
|
||
| You may meet building errors when building libGLFW.so. It is because libGL.so directs to an error target, | ||
| you should make it to direct to a correct one. `install-deps-linux.sh` only has to be run once. | ||
|
|
||
| * For Windows | ||
|
|
||
| Open the `cocos2d-x/build/cocos2d-win32.sln` | ||
|
|
||
| * For Windows 8.1 Universal Apps (Phone and Store) | ||
|
|
||
| Open the `cocos2d-x/build/cocos2d-win8.1-universal.sln` | ||
|
|
||
| * For Android | ||
|
|
||
| ``` | ||
| $ cd cocos2d-x/build | ||
| $ python ./android-build.py cpp-empty-test -p 10 | ||
| $ adb install ../tests/cpp-empty-test/proj.android/bin/CppEmptyTest-debug.apk | ||
| ``` | ||
|
|
||
| Then click item on Android device to run tests. Available value of `-p` is the API level, cocos2d-x supports from level 10. | ||
|
|
||
|
|
||
| Contributing to the Project | ||
| -------------------------------- | ||
|
|
||
| Did you find a bug? Do you have feature request? Do you want to merge a feature? | ||
|
|
||
| * [contributing to cocos2d-x][8] | ||
|
|
||
|
|
||
| Contact us | ||
| ---------- | ||
|
|
||
| * Forum: [http://forum.cocos2d-x.org][9] | ||
| * Twitter: [http://www.twitter.com/cocos2dx][10] | ||
| * Weibo: [http://t.sina.com.cn/cocos2dx][11] | ||
| * IRC: [https://webchat.freenode.net/][12] (#cocos2d and #cocos2d-x channels) | ||
|
|
||
| [1]: http://www.cocos2d-x.org "cocos2d-x" | ||
| [2]: http://www.cocos2d-iphone.org "cocos2d for iPhone" | ||
| [3]: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download | ||
| [4]: http://www.cocos2d-x.org/download/version#Cocos2d-x | ||
| [5]: http://www.box2d.org "Box2D" | ||
| [6]: http://www.chipmunk-physics.net "Chipmunk2D" | ||
| [7]: http://esotericsoftware.com/ "http://esotericsoftware.com/" | ||
| [8]: https://github.com/cocos2d/cocos2d-x/blob/v3/docs/CONTRIBUTE.md | ||
| [9]: http://forum.cocos2d-x.org "http://forum.cocos2d-x.org" | ||
| [10]: http://www.twitter.com/cocos2dx "http://www.twitter.com/cocos2dx" | ||
| [11]: http://t.sina.com.cn/cocos2dx "http://t.sina.com.cn/cocos2dx" | ||
| [12]: https://webchat.freenode.net/ "https://webchat.freenode.net/" |
| @@ -0,0 +1,117 @@ | ||
| #!/usr/bin/python | ||
| # android-build.py | ||
| # Build android | ||
|
|
||
| import sys | ||
| import os, os.path | ||
| from optparse import OptionParser | ||
|
|
||
| CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests', 'game-controller-test'] | ||
| LUA_SAMPLES = ['lua-empty-test', 'lua-tests', 'lua-game-controller-test'] | ||
| JS_SAMPLES = ['js-tests'] | ||
| ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES + JS_SAMPLES | ||
|
|
||
| def caculate_built_samples(args): | ||
| ''' Compute the sampels to be built | ||
| 'cpp' for short of all cpp tests | ||
| 'lua' for short of all lua tests | ||
| ''' | ||
|
|
||
| if 'all' in args: | ||
| return ALL_SAMPLES | ||
|
|
||
| targets = [] | ||
| if 'cpp' in args: | ||
| targets += CPP_SAMPLES | ||
| args.remove('cpp') | ||
| if 'lua' in args: | ||
| targets += LUA_SAMPLES | ||
| args.remove('lua') | ||
| if 'js' in args: | ||
| targets += JS_SAMPLES | ||
| args.remove('js') | ||
|
|
||
| targets += args | ||
|
|
||
| # remove duplicate elements, for example | ||
| # python android-build.py cpp hellocpp | ||
| targets = set(targets) | ||
| return list(targets) | ||
|
|
||
| def do_build(app_android_root, build_mode): | ||
|
|
||
| command = 'cocos compile -p android -s %s --ndk-mode %s' % (app_android_root, build_mode) | ||
| print command | ||
|
|
||
| if os.system(command) != 0: | ||
| raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") | ||
|
|
||
| def build_samples(target, build_mode): | ||
|
|
||
| if build_mode is None: | ||
| build_mode = 'debug' | ||
| elif build_mode != 'release': | ||
| build_mode = 'debug' | ||
|
|
||
| build_targets = caculate_built_samples(target) | ||
|
|
||
| app_android_root = '' | ||
|
|
||
| target_proj_path_map = { | ||
| "cpp-empty-test": "tests/cpp-empty-test", | ||
| "game-controller-test": "tests/game-controller-test", | ||
| "cpp-tests": "tests/cpp-tests", | ||
| "lua-empty-test": "tests/lua-empty-test", | ||
| "lua-tests": "tests/lua-tests", | ||
| "lua-game-controller-test": "tests/lua-game-controller-test", | ||
| "js-tests": "tests/js-tests" | ||
| } | ||
|
|
||
| cocos_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..") | ||
|
|
||
| for target in build_targets: | ||
| if target in target_proj_path_map: | ||
| app_android_root = os.path.join(cocos_root, target_proj_path_map[target]) | ||
| else: | ||
| print 'unknown target: %s' % target | ||
| continue | ||
|
|
||
| do_build(app_android_root, build_mode) | ||
|
|
||
| # -------------- main -------------- | ||
| if __name__ == '__main__': | ||
|
|
||
| #parse the params | ||
| usage = """ | ||
| This script is mainy used for building tests built-in with cocos2d-x. | ||
| Usage: %prog [options] [cpp-empty-test|cpp-tests|lua-empty-test|lua-tests|js-tests|cpp|lua|all] | ||
| If you are new to cocos2d-x, I recommend you start with cpp-empty-test, lua-empty-test. | ||
| You can combine these targets like this: | ||
| python android-build.py cpp-empty-test lua-empty-test | ||
| """ | ||
|
|
||
| parser = OptionParser(usage=usage) | ||
| parser.add_option("-n", "--ndk", dest="ndk_build_param", | ||
| help='It is not used anymore, because cocos console does not support it.') | ||
| parser.add_option("-p", "--platform", dest="android_platform", | ||
| help='This parameter is not used any more, just keep compatible.') | ||
| parser.add_option("-b", "--build", dest="build_mode", | ||
| help='The build mode for java project,debug[default] or release. \ | ||
| Get more information, \ | ||
| please refer to http://developer.android.com/tools/building/building-cmdline.html') | ||
| (opts, args) = parser.parse_args() | ||
|
|
||
| if len(args) == 0: | ||
| parser.print_help() | ||
| sys.exit(1) | ||
| else: | ||
| try: | ||
| build_samples(args, opts.build_mode) | ||
| except Exception as e: | ||
| print e | ||
| sys.exit(1) |
| @@ -0,0 +1,87 @@ | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 2013 | ||
| VisualStudioVersion = 12.0.21005.1 | ||
| MinimumVisualStudioVersion = 12.0.21005.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{92D54E36-7916-48EF-A951-224DD3B25442}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\cocos\scripting\js-bindings\proj.win32\libjscocos2d.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js-tests", "..\tests\js-tests\project\proj.win32\js-tests.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|ARM = Debug|ARM | ||
| Debug|Win32 = Debug|Win32 | ||
| Release|ARM = Release|ARM | ||
| Release|Win32 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32 | ||
| {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {39379840-825A-45A0-B363-C09FFEF864BD}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32 | ||
| {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {D0F06A44-A245-4D13-A498-0120C203B539}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(NestedProjects) = preSolution | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| {929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| {41E34993-647E-4282-8384-4AB1AE31A452} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| EndGlobalSection | ||
| GlobalSection(DPCodeReviewSolutionGUID) = preSolution | ||
| DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} | ||
| EndGlobalSection | ||
| GlobalSection(DPCodeReviewSolutionGUID) = preSolution | ||
| DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} | ||
| EndGlobalSection | ||
| EndGlobal |
| @@ -0,0 +1,138 @@ | ||
|
|
||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 14 | ||
| VisualStudioVersion = 14.0.22823.1 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{17093B03-00CA-402F-981A-D8C84B2922B5}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win10\libSpine.vcxproj", "{4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj-win10\libbox2d.vcxproj", "{0C32D479-46D5-46C3-9AA9-0A8FF8320516}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d_win10\libcocos2d.vcxproj", "{07C2895D-720C-487D-B7B4-12C293EA533F}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj.win10\cpp-empty-test.vcxproj", "{87ED86E7-A850-433F-88D5-D5F65CFF7BF5}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win10\cpp-tests.vcxproj", "{C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win10\libbullet.vcxproj", "{ECEE1119-CE2E-4F7E-83A8-1932EA48E893}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\external\recast\proj.win10\librecast.vcxproj", "{F551524D-8A70-4B2F-A7C2-28AE61150022}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|ARM = Debug|ARM | ||
| Debug|x64 = Debug|x64 | ||
| Debug|x86 = Debug|x86 | ||
| Release|ARM = Release|ARM | ||
| Release|x64 = Release|x64 | ||
| Release|x86 = Release|x86 | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.Build.0 = Debug|ARM | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.Build.0 = Debug|x64 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.Build.0 = Debug|Win32 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.ActiveCfg = Release|ARM | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.Build.0 = Release|ARM | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.ActiveCfg = Release|x64 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.Build.0 = Release|x64 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.ActiveCfg = Release|Win32 | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.Build.0 = Release|Win32 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.Build.0 = Debug|ARM | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.Build.0 = Debug|x64 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.Build.0 = Debug|Win32 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.ActiveCfg = Release|ARM | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.Build.0 = Release|ARM | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.ActiveCfg = Release|x64 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.Build.0 = Release|x64 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.ActiveCfg = Release|Win32 | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.Build.0 = Release|Win32 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.Build.0 = Debug|ARM | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.Build.0 = Debug|x64 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.Build.0 = Debug|Win32 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.ActiveCfg = Release|ARM | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.Build.0 = Release|ARM | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.ActiveCfg = Release|x64 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.Build.0 = Release|x64 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.ActiveCfg = Release|Win32 | ||
| {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.Build.0 = Release|Win32 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.Build.0 = Debug|ARM | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.Deploy.0 = Debug|ARM | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.Build.0 = Debug|x64 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.Deploy.0 = Debug|x64 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.Build.0 = Debug|Win32 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.Deploy.0 = Debug|Win32 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.ActiveCfg = Release|ARM | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.Build.0 = Release|ARM | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.Deploy.0 = Release|ARM | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.ActiveCfg = Release|x64 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.Build.0 = Release|x64 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.Deploy.0 = Release|x64 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.ActiveCfg = Release|Win32 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.Build.0 = Release|Win32 | ||
| {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.Deploy.0 = Release|Win32 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.Build.0 = Debug|ARM | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.Deploy.0 = Debug|ARM | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.Build.0 = Debug|x64 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.Deploy.0 = Debug|x64 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.Build.0 = Debug|Win32 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.Deploy.0 = Debug|Win32 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.ActiveCfg = Release|ARM | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.Build.0 = Release|ARM | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.Deploy.0 = Release|ARM | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.ActiveCfg = Release|x64 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.Build.0 = Release|x64 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.Deploy.0 = Release|x64 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.ActiveCfg = Release|Win32 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.Build.0 = Release|Win32 | ||
| {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.Deploy.0 = Release|Win32 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.Build.0 = Debug|ARM | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.Build.0 = Debug|x64 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.Build.0 = Debug|Win32 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.ActiveCfg = Release|ARM | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.Build.0 = Release|ARM | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.ActiveCfg = Release|x64 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.Build.0 = Release|x64 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.ActiveCfg = Release|Win32 | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.Build.0 = Release|Win32 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Debug|ARM.ActiveCfg = Debug|ARM | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Debug|ARM.Build.0 = Debug|ARM | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Debug|x64.Build.0 = Debug|x64 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Debug|x86.Build.0 = Debug|Win32 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Release|ARM.ActiveCfg = Release|ARM | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Release|ARM.Build.0 = Release|ARM | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Release|x64.ActiveCfg = Release|x64 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Release|x64.Build.0 = Release|x64 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Release|x86.ActiveCfg = Release|Win32 | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022}.Release|x86.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(NestedProjects) = preSolution | ||
| {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8} = {17093B03-00CA-402F-981A-D8C84B2922B5} | ||
| {0C32D479-46D5-46C3-9AA9-0A8FF8320516} = {17093B03-00CA-402F-981A-D8C84B2922B5} | ||
| {ECEE1119-CE2E-4F7E-83A8-1932EA48E893} = {17093B03-00CA-402F-981A-D8C84B2922B5} | ||
| {F551524D-8A70-4B2F-A7C2-28AE61150022} = {17093B03-00CA-402F-981A-D8C84B2922B5} | ||
| EndGlobalSection | ||
| EndGlobal |
| @@ -0,0 +1,114 @@ | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 2013 | ||
| VisualStudioVersion = 12.0.31101.0 | ||
| MinimumVisualStudioVersion = 12.0.21005.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-tests", "..\tests\lua-tests\project\proj.win32\lua-tests.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj.win32\cpp-empty-test.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" | ||
| ProjectSection(ProjectDependencies) = postProject | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} | ||
| EndProjectSection | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos2d", "..\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj", "{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{92D54E36-7916-48EF-A951-224DD3B25442}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" | ||
| EndProject | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|ARM = Debug|ARM | ||
| Debug|Win32 = Debug|Win32 | ||
| Release|ARM = Release|ARM | ||
| Release|Win32 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32 | ||
| {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32 | ||
| {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32 | ||
| {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 | ||
| {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.Build.0 = Release|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|ARM.ActiveCfg = Debug|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = Debug|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Release|ARM.ActiveCfg = Release|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.ActiveCfg = Release|Win32 | ||
| {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(NestedProjects) = preSolution | ||
| {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| {929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| {41E34993-647E-4282-8384-4AB1AE31A452} = {92D54E36-7916-48EF-A951-224DD3B25442} | ||
| EndGlobalSection | ||
| GlobalSection(DPCodeReviewSolutionGUID) = preSolution | ||
| DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} | ||
| EndGlobalSection | ||
| GlobalSection(DPCodeReviewSolutionGUID) = preSolution | ||
| DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} | ||
| EndGlobalSection | ||
| EndGlobal |
| @@ -0,0 +1,77 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Scheme | ||
| LastUpgradeVersion = "0640" | ||
| version = "1.3"> | ||
| <BuildAction | ||
| parallelizeBuildables = "YES" | ||
| buildImplicitDependencies = "YES"> | ||
| <BuildActionEntries> | ||
| <BuildActionEntry | ||
| buildForTesting = "YES" | ||
| buildForRunning = "YES" | ||
| buildForProfiling = "YES" | ||
| buildForArchiving = "YES" | ||
| buildForAnalyzing = "YES"> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "1551A33E158F2AB200E66CFE" | ||
| BuildableName = "libcocos2d Mac.a" | ||
| BlueprintName = "libcocos2d Mac" | ||
| ReferencedContainer = "container:cocos2d_libs.xcodeproj"> | ||
| </BuildableReference> | ||
| </BuildActionEntry> | ||
| </BuildActionEntries> | ||
| </BuildAction> | ||
| <TestAction | ||
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| shouldUseLaunchSchemeArgsEnv = "YES" | ||
| buildConfiguration = "Debug"> | ||
| <Testables> | ||
| </Testables> | ||
| </TestAction> | ||
| <LaunchAction | ||
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| launchStyle = "0" | ||
| useCustomWorkingDirectory = "NO" | ||
| buildConfiguration = "Debug" | ||
| ignoresPersistentStateOnLaunch = "NO" | ||
| debugDocumentVersioning = "YES" | ||
| allowLocationSimulation = "YES"> | ||
| <MacroExpansion> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "1551A33E158F2AB200E66CFE" | ||
| BuildableName = "libcocos2d Mac.a" | ||
| BlueprintName = "libcocos2d Mac" | ||
| ReferencedContainer = "container:cocos2d_libs.xcodeproj"> | ||
| </BuildableReference> | ||
| </MacroExpansion> | ||
| <AdditionalOptions> | ||
| </AdditionalOptions> | ||
| </LaunchAction> | ||
| <ProfileAction | ||
| shouldUseLaunchSchemeArgsEnv = "YES" | ||
| savedToolIdentifier = "" | ||
| useCustomWorkingDirectory = "NO" | ||
| buildConfiguration = "Release" | ||
| debugDocumentVersioning = "YES"> | ||
| <MacroExpansion> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "1551A33E158F2AB200E66CFE" | ||
| BuildableName = "libcocos2d Mac.a" | ||
| BlueprintName = "libcocos2d Mac" | ||
| ReferencedContainer = "container:cocos2d_libs.xcodeproj"> | ||
| </BuildableReference> | ||
| </MacroExpansion> | ||
| </ProfileAction> | ||
| <AnalyzeAction | ||
| buildConfiguration = "Debug"> | ||
| </AnalyzeAction> | ||
| <ArchiveAction | ||
| buildConfiguration = "Release" | ||
| revealArchiveInOrganizer = "YES"> | ||
| </ArchiveAction> | ||
| </Scheme> |
| @@ -0,0 +1,77 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Scheme | ||
| LastUpgradeVersion = "0640" | ||
| version = "1.3"> | ||
| <BuildAction | ||
| parallelizeBuildables = "YES" | ||
| buildImplicitDependencies = "YES"> | ||
| <BuildActionEntries> | ||
| <BuildActionEntry | ||
| buildForTesting = "YES" | ||
| buildForRunning = "YES" | ||
| buildForProfiling = "YES" | ||
| buildForArchiving = "YES" | ||
| buildForAnalyzing = "YES"> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "A07A4C241783777C0073F6A7" | ||
| BuildableName = "libcocos2d iOS.a" | ||
| BlueprintName = "libcocos2d iOS" | ||
| ReferencedContainer = "container:cocos2d_libs.xcodeproj"> | ||
| </BuildableReference> | ||
| </BuildActionEntry> | ||
| </BuildActionEntries> | ||
| </BuildAction> | ||
| <TestAction | ||
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| shouldUseLaunchSchemeArgsEnv = "YES" | ||
| buildConfiguration = "Debug"> | ||
| <Testables> | ||
| </Testables> | ||
| </TestAction> | ||
| <LaunchAction | ||
| selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| launchStyle = "0" | ||
| useCustomWorkingDirectory = "NO" | ||
| buildConfiguration = "Debug" | ||
| ignoresPersistentStateOnLaunch = "NO" | ||
| debugDocumentVersioning = "YES" | ||
| allowLocationSimulation = "YES"> | ||
| <MacroExpansion> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "A07A4C241783777C0073F6A7" | ||
| BuildableName = "libcocos2d iOS.a" | ||
| BlueprintName = "libcocos2d iOS" | ||
| ReferencedContainer = "container:cocos2d_libs.xcodeproj"> | ||
| </BuildableReference> | ||
| </MacroExpansion> | ||
| <AdditionalOptions> | ||
| </AdditionalOptions> | ||
| </LaunchAction> | ||
| <ProfileAction | ||
| shouldUseLaunchSchemeArgsEnv = "YES" | ||
| savedToolIdentifier = "" | ||
| useCustomWorkingDirectory = "NO" | ||
| buildConfiguration = "Release" | ||
| debugDocumentVersioning = "YES"> | ||
| <MacroExpansion> | ||
| <BuildableReference | ||
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "A07A4C241783777C0073F6A7" | ||
| BuildableName = "libcocos2d iOS.a" | ||
| BlueprintName = "libcocos2d iOS" | ||
| ReferencedContainer = "container:cocos2d_libs.xcodeproj"> | ||
| </BuildableReference> | ||
| </MacroExpansion> | ||
| </ProfileAction> | ||
| <AnalyzeAction | ||
| buildConfiguration = "Debug"> | ||
| </AnalyzeAction> | ||
| <ArchiveAction | ||
| buildConfiguration = "Release" | ||
| revealArchiveInOrganizer = "YES"> | ||
| </ArchiveAction> | ||
| </Scheme> |
| @@ -0,0 +1,32 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>SchemeUserState</key> | ||
| <dict> | ||
| <key>libcocos2d Mac.xcscheme</key> | ||
| <dict> | ||
| <key>orderHint</key> | ||
| <integer>2</integer> | ||
| </dict> | ||
| <key>libcocos2d iOS.xcscheme</key> | ||
| <dict> | ||
| <key>orderHint</key> | ||
| <integer>3</integer> | ||
| </dict> | ||
| </dict> | ||
| <key>SuppressBuildableAutocreation</key> | ||
| <dict> | ||
| <key>1551A33E158F2AB200E66CFE</key> | ||
| <dict> | ||
| <key>primary</key> | ||
| <true/> | ||
| </dict> | ||
| <key>A07A4C241783777C0073F6A7</key> | ||
| <dict> | ||
| <key>primary</key> | ||
| <true/> | ||
| </dict> | ||
| </dict> | ||
| </dict> | ||
| </plist> |
| @@ -0,0 +1,56 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Change directory to the location of this script | ||
| cd $(dirname ${BASH_SOURCE[0]}) | ||
|
|
||
| if [ ! $(command -v apt-get) ]; then | ||
| echo "Not a .deb package system. Please install dependencies manually" | ||
| exit 0 | ||
| fi | ||
|
|
||
| #install g++-4.9 | ||
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | ||
| sudo apt-get update | ||
|
|
||
| #try to remove glfw2 | ||
| sudo apt-get remove libglfw2 | ||
|
|
||
| DEPENDS='libx11-dev' | ||
| DEPENDS+=' libxmu-dev' | ||
| DEPENDS+=' libglu1-mesa-dev' | ||
| DEPENDS+=' libgl2ps-dev' | ||
| DEPENDS+=' libxi-dev' | ||
| DEPENDS+=' g++-4.9' | ||
| DEPENDS+=' libzip-dev' | ||
| DEPENDS+=' libpng12-dev' | ||
| DEPENDS+=' libcurl4-gnutls-dev' | ||
| DEPENDS+=' libfontconfig1-dev' | ||
| DEPENDS+=' libsqlite3-dev' | ||
| DEPENDS+=' libglew-dev' | ||
| DEPENDS+=' libssl-dev' | ||
|
|
||
| MISSING= | ||
| echo "Checking for missing packages ..." | ||
| for i in $DEPENDS; do | ||
| if ! dpkg-query -W --showformat='${Status}\n' $i | grep "install ok installed" > /dev/null; then | ||
| MISSING+="$i " | ||
| fi | ||
| done | ||
|
|
||
|
|
||
| if [ -f /usr/bin/g++ ];then | ||
| sudo rm /usr/bin/g++ | ||
| echo "remove old g++" | ||
| fi | ||
| sudo ln -s /usr/bin/g++-4.9 /usr/bin/g++ | ||
|
|
||
| if [ -n "$MISSING" ]; then | ||
| TXTCOLOR_DEFAULT="\033[0;m" | ||
| TXTCOLOR_GREEN="\033[0;32m" | ||
| echo -e $TXTCOLOR_GREEN"Missing packages: $MISSING.\nYou may be asked for your password for package installation."$TXTCOLOR_DEFAULT | ||
| sudo apt-get --force-yes --yes install $MISSING | ||
| fi | ||
|
|
||
| # install glfw | ||
| ../tools/travis-scripts/install_glfw.sh | ||
|
|
| @@ -0,0 +1,8 @@ | ||
| @echo off | ||
| SETLOCAL | ||
|
|
||
| :start | ||
| mkdir win32-msvc-vs2013-x86 | ||
| cd win32-msvc-vs2013-x86 | ||
| cmake -G "Visual Studio 12" ../.. | ||
| pause |
| @@ -0,0 +1,2 @@ | ||
| # For compatibility only, please use include(CocosBuildHelpers) in future projects | ||
| include(CocosBuildHelpers) |
| @@ -0,0 +1,160 @@ | ||
| #.rst: | ||
| # CMakeParseArguments | ||
| # ------------------- | ||
| # | ||
| # | ||
| # | ||
| # CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> | ||
| # <multi_value_keywords> args...) | ||
| # | ||
| # CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions | ||
| # for parsing the arguments given to that macro or function. It | ||
| # processes the arguments and defines a set of variables which hold the | ||
| # values of the respective options. | ||
| # | ||
| # The <options> argument contains all options for the respective macro, | ||
| # i.e. keywords which can be used when calling the macro without any | ||
| # value following, like e.g. the OPTIONAL keyword of the install() | ||
| # command. | ||
| # | ||
| # The <one_value_keywords> argument contains all keywords for this macro | ||
| # which are followed by one value, like e.g. DESTINATION keyword of the | ||
| # install() command. | ||
| # | ||
| # The <multi_value_keywords> argument contains all keywords for this | ||
| # macro which can be followed by more than one value, like e.g. the | ||
| # TARGETS or FILES keywords of the install() command. | ||
| # | ||
| # When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the | ||
| # keywords listed in <options>, <one_value_keywords> and | ||
| # <multi_value_keywords> a variable composed of the given <prefix> | ||
| # followed by "_" and the name of the respective keyword. These | ||
| # variables will then hold the respective value from the argument list. | ||
| # For the <options> keywords this will be TRUE or FALSE. | ||
| # | ||
| # All remaining arguments are collected in a variable | ||
| # <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see | ||
| # whether your macro was called with unrecognized parameters. | ||
| # | ||
| # As an example here a my_install() macro, which takes similar arguments | ||
| # as the real install() command: | ||
| # | ||
| # :: | ||
| # | ||
| # function(MY_INSTALL) | ||
| # set(options OPTIONAL FAST) | ||
| # set(oneValueArgs DESTINATION RENAME) | ||
| # set(multiValueArgs TARGETS CONFIGURATIONS) | ||
| # cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) | ||
| # ... | ||
| # | ||
| # | ||
| # | ||
| # Assume my_install() has been called like this: | ||
| # | ||
| # :: | ||
| # | ||
| # my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) | ||
| # | ||
| # | ||
| # | ||
| # After the cmake_parse_arguments() call the macro will have set the | ||
| # following variables: | ||
| # | ||
| # :: | ||
| # | ||
| # MY_INSTALL_OPTIONAL = TRUE | ||
| # MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() | ||
| # MY_INSTALL_DESTINATION = "bin" | ||
| # MY_INSTALL_RENAME = "" (was not used) | ||
| # MY_INSTALL_TARGETS = "foo;bar" | ||
| # MY_INSTALL_CONFIGURATIONS = "" (was not used) | ||
| # MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" | ||
| # | ||
| # | ||
| # | ||
| # You can then continue and process these variables. | ||
| # | ||
| # Keywords terminate lists of values, e.g. if directly after a | ||
| # one_value_keyword another recognized keyword follows, this is | ||
| # interpreted as the beginning of the new option. E.g. | ||
| # my_install(TARGETS foo DESTINATION OPTIONAL) would result in | ||
| # MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION | ||
| # would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. | ||
|
|
||
| #============================================================================= | ||
| # Copyright 2010 Alexander Neundorf <neundorf@kde.org> | ||
| # | ||
| # Distributed under the OSI-approved BSD License (the "License"); | ||
| # see accompanying file Copyright.txt for details. | ||
| # | ||
| # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| # See the License for more information. | ||
| #============================================================================= | ||
| # (To distribute this file outside of CMake, substitute the full | ||
| # License text for the above reference.) | ||
|
|
||
|
|
||
| if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) | ||
| return() | ||
| endif() | ||
| set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) | ||
|
|
||
|
|
||
| function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) | ||
| # first set all result variables to empty/FALSE | ||
| foreach(arg_name ${_singleArgNames} ${_multiArgNames}) | ||
| set(${prefix}_${arg_name}) | ||
| endforeach() | ||
|
|
||
| foreach(option ${_optionNames}) | ||
| set(${prefix}_${option} FALSE) | ||
| endforeach() | ||
|
|
||
| set(${prefix}_UNPARSED_ARGUMENTS) | ||
|
|
||
| set(insideValues FALSE) | ||
| set(currentArgName) | ||
|
|
||
| # now iterate over all arguments and fill the result variables | ||
| foreach(currentArg ${ARGN}) | ||
| list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword | ||
| list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword | ||
| list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword | ||
|
|
||
| if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) | ||
| if(insideValues) | ||
| if("${insideValues}" STREQUAL "SINGLE") | ||
| set(${prefix}_${currentArgName} ${currentArg}) | ||
| set(insideValues FALSE) | ||
| elseif("${insideValues}" STREQUAL "MULTI") | ||
| list(APPEND ${prefix}_${currentArgName} ${currentArg}) | ||
| endif() | ||
| else() | ||
| list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) | ||
| endif() | ||
| else() | ||
| if(NOT ${optionIndex} EQUAL -1) | ||
| set(${prefix}_${currentArg} TRUE) | ||
| set(insideValues FALSE) | ||
| elseif(NOT ${singleArgIndex} EQUAL -1) | ||
| set(currentArgName ${currentArg}) | ||
| set(${prefix}_${currentArgName}) | ||
| set(insideValues "SINGLE") | ||
| elseif(NOT ${multiArgIndex} EQUAL -1) | ||
| set(currentArgName ${currentArg}) | ||
| set(${prefix}_${currentArgName}) | ||
| set(insideValues "MULTI") | ||
| endif() | ||
| endif() | ||
|
|
||
| endforeach() | ||
|
|
||
| # propagate the result variables to the caller: | ||
| foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) | ||
| set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) | ||
| endforeach() | ||
| set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) | ||
|
|
||
| endfunction() |
| @@ -0,0 +1,163 @@ | ||
| include(CMakeParseArguments) | ||
|
|
||
| macro(pre_build TARGET_NAME) | ||
| add_custom_target( ${TARGET_NAME}_PRE_BUILD ALL ) | ||
|
|
||
| add_custom_command( | ||
| TARGET ${TARGET_NAME}_PRE_BUILD | ||
| ${ARGN} | ||
| PRE_BUILD | ||
| COMMENT "${TARGET_NAME}_PRE_BUILD ..." | ||
| ) | ||
|
|
||
| add_custom_target(${TARGET_NAME}_CORE_PRE_BUILD) | ||
| add_dependencies(${TARGET_NAME}_PRE_BUILD ${TARGET_NAME}_CORE_PRE_BUILD) | ||
| add_dependencies(${TARGET_NAME} ${TARGET_NAME}_PRE_BUILD) | ||
| endmacro() | ||
|
|
||
| function(cocos_mark_resources) | ||
| set(oneValueArgs BASEDIR RESOURCEBASE) | ||
| set(multiValueArgs FILES) | ||
| cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
|
||
| if(NOT opt_RESOURCEBASE) | ||
| set(opt_RESOURCEBASE Resources) | ||
| endif() | ||
|
|
||
| get_filename_component(BASEDIR_ABS ${opt_BASEDIR} ABSOLUTE) | ||
| foreach(RES_FILE ${opt_FILES} ${opt_UNPARSED_ARGUMENTS}) | ||
| get_filename_component(RES_FILE_ABS ${RES_FILE} ABSOLUTE) | ||
| file(RELATIVE_PATH RES ${BASEDIR_ABS} ${RES_FILE_ABS}) | ||
| get_filename_component(RES_LOC ${RES} PATH) | ||
| set_source_files_properties(${RES_FILE} PROPERTIES | ||
| MACOSX_PACKAGE_LOCATION "${opt_RESOURCEBASE}/${RES_LOC}" | ||
| HEADER_FILE_ONLY 1 | ||
| ) | ||
| endforeach() | ||
| endfunction() | ||
|
|
||
| # cocos_find_package(pkg args...) | ||
| # works same as find_package, but do additional care to properly find | ||
| # prebuilt libs for cocos | ||
| macro(cocos_find_package pkg_name pkg_prefix) | ||
| if(NOT USE_PREBUILT_LIBS OR NOT ${pkg_prefix}_FOUND) | ||
| find_package(${pkg_name} ${ARGN}) | ||
| endif() | ||
| if(NOT ${pkg_prefix}_INCLUDE_DIRS AND ${pkg_prefix}_INCLUDE_DIR) | ||
| set(${pkg_prefix}_INCLUDE_DIRS ${${pkg_prefix}_INCLUDE_DIR}) | ||
| endif() | ||
| if(NOT ${pkg_prefix}_LIBRARIES AND ${pkg_prefix}_LIBRARY) | ||
| set(${pkg_prefix}_LIBRARIES ${${pkg_prefix}_LIBRARY}) | ||
| endif() | ||
|
|
||
| message(STATUS "${pkg_name} include dirs: ${${pkg_prefix}_INCLUDE_DIRS}") | ||
| endmacro() | ||
|
|
||
| # cocos_use_pkg(pkg) function. | ||
| # This function applies standard package variables (after find_package(pkg) call) to current scope | ||
| # Recognized variables: <pkg>_INCLUDE_DIRS, <pkg>_LIBRARIES, <pkg>_LIBRARY_DIRS | ||
| # Also if BUILD_SHARED_LIBS variable off, it is try to use <pkg>_STATIC_* vars before | ||
| function(cocos_use_pkg target pkg) | ||
| set(prefix ${pkg}) | ||
|
|
||
| set(_include_dirs) | ||
| if(NOT _include_dirs) | ||
| set(_include_dirs ${${prefix}_INCLUDE_DIRS}) | ||
| endif() | ||
| if(NOT _include_dirs) | ||
| # backward compat with old package-find scripts | ||
| set(_include_dirs ${${prefix}_INCLUDE_DIR}) | ||
| endif() | ||
| if(_include_dirs) | ||
| include_directories(${_include_dirs}) | ||
| message(STATUS "${pkg} add to include_dirs: ${_include_dirs}") | ||
| endif() | ||
|
|
||
| set(_library_dirs) | ||
| if(NOT _library_dirs) | ||
| set(_library_dirs ${${prefix}_LIBRARY_DIRS}) | ||
| endif() | ||
| if(_library_dirs) | ||
| link_directories(${_library_dirs}) | ||
| message(STATUS "${pkg} add to link_dirs: ${_library_dirs}") | ||
| endif() | ||
|
|
||
| set(_libs) | ||
| if(NOT _libs) | ||
| set(_libs ${${prefix}_LIBRARIES}) | ||
| endif() | ||
| if(NOT _libs) | ||
| set(_libs ${${prefix}_LIBRARY}) | ||
| endif() | ||
| if(_libs) | ||
| target_link_libraries(${target} ${_libs}) | ||
| message(STATUS "${pkg} libs added to '${target}': ${_libs}") | ||
| endif() | ||
|
|
||
| set(_defs) | ||
| if(NOT _defs) | ||
| set(_defs ${${prefix}_DEFINITIONS}) | ||
| endif() | ||
| if(_defs) | ||
| add_definitions(${_defs}) | ||
| message(STATUS "${pkg} add definitions: ${_defs}") | ||
| endif() | ||
| endfunction() | ||
|
|
||
| #cmake has some strange defaults, this should help us a lot | ||
| #Please use them everywhere | ||
|
|
||
| #WINDOWS = Windows Desktop | ||
| #WINRT = Windows RT | ||
| #WP8 = Windows Phone 8 | ||
| #ANDROID = Android | ||
| #IOS = iOS | ||
| #MACOSX = MacOS X | ||
| #LINUX = Linux | ||
|
|
||
| if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
| if(WINRT) | ||
| set(SYSTEM_STRING "Windows RT") | ||
| elseif(WP8) | ||
| set(SYSTEM_STRING "Windows Phone 8") | ||
| else() | ||
| set(WINDOWS TRUE) | ||
| set(SYSTEM_STRING "Windows Desktop") | ||
| endif() | ||
| elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||
| if(ANDROID) | ||
| set(SYSTEM_STRING "Android") | ||
| else() | ||
| set(LINUX TRUE) | ||
| set(SYSTEM_STRING "Linux") | ||
| endif() | ||
| elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
| if(IOS) | ||
| set(SYSTEM_STRING "IOS") | ||
| else() | ||
| set(MACOSX TRUE) | ||
| set(APPLE TRUE) | ||
| set(SYSTEM_STRING "Mac OSX") | ||
| endif() | ||
| endif() | ||
|
|
||
| if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | ||
| set(COMPILER_STRING ${CMAKE_CXX_COMPILER_ID}) | ||
| set(CLANG TRUE) | ||
| elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
| if(MINGW) | ||
| set(COMPILER_STRING "Mingw GCC") | ||
| else() | ||
| set(COMPILER_STRING "GCC") | ||
| endif() | ||
| elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") | ||
| set(COMPILER_STRING "${CMAKE_CXX_COMPILER_ID} C++") | ||
| elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") | ||
| set(COMPILER_STRING "Visual Studio C++") | ||
| endif() | ||
|
|
||
| if(CMAKE_CROSSCOMPILING) | ||
| set(BUILDING_STRING "It appears you are cross compiling for ${SYSTEM_STRING} with ${COMPILER_STRING}") | ||
| else() | ||
| set(BUILDING_STRING "It appears you are builing natively for ${SYSTEM_STRING} with ${COMPILER_STRING}") | ||
| endif() |
| @@ -0,0 +1,169 @@ | ||
| # CocosUsePrebuiltLibs - sets external libs variables to link with | ||
|
|
||
| # START CONFIG | ||
|
|
||
| set(_chipmunk_inc chipmunk.h) | ||
| set(_chipmunk_inc_paths chipmunk) | ||
| set(_chipmunk_libs chipmunk libchipmunk) | ||
|
|
||
| set(_curl_inc curl/curl.h) | ||
| set(_curl_libs crypto ssl libeay32 ssleay32 curl libcurl_imp libcurl) | ||
|
|
||
| set(_freetype2_prefix FREETYPE) | ||
| set(_freetype2_inc ft2build.h freetype/freetype.h) | ||
| set(_freetype2_inc_paths freetype2) | ||
| set(_freetype2_libs freetype freetype250) | ||
|
|
||
| set(_jpeg_inc jpeglib.h) | ||
| set(_jpeg_libs jpeg libjpeg) | ||
|
|
||
| set(_png_inc png.h) | ||
| set(_png_libs png libpng) | ||
|
|
||
| set(_tiff_inc tiff.h) | ||
| set(_tiff_libs tiff libtiff) | ||
|
|
||
| set(_webp_inc decode.h) | ||
| set(_webp_libs webp libwebp) | ||
|
|
||
| set(_websockets_inc libwebsockets.h) | ||
| set(_websockets_libs websockets libwebsockets) | ||
|
|
||
| set(_glfw3_inc glfw3.h) | ||
| set(_glfw3_libs glfw3 libglfw3) | ||
|
|
||
| set(_sqlite3_inc sqlite3.h) | ||
| set(_sqlite3_libs sqlite3) | ||
|
|
||
| set(_gles_prefix GLEW) | ||
| set(_gles_inc GL/glew.h) | ||
| set(_gles_inc_paths OGLES) | ||
| set(_gles_libs glew32) | ||
|
|
||
| set(_icon_prefix ICONV) | ||
| set(_icon_inc iconv.h) | ||
| set(_icon_libs libiconv) | ||
|
|
||
| set(_MP3Decoder_prefix MPG123) | ||
| set(_MP3Decoder_inc mpg123.h) | ||
| set(_MP3Decoder_libs libmpg123) | ||
|
|
||
| set(_OggDecoder_prefix VORBIS) | ||
| set(_OggDecoder_inc ogg/ogg.h) | ||
| set(_OggDecoder_libs libogg libvorbis libvorbisfile) | ||
|
|
||
| set(_OpenalSoft_prefix OPENAL) | ||
| set(_OpenalSoft_inc al.h) | ||
| set(_OpenalSoft_inc_paths AL) | ||
| set(_OpenalSoft_libs OpenAL32) | ||
|
|
||
| set(_zlib_inc zlib.h) | ||
| set(_zlib_libs z libzlib libz) | ||
|
|
||
| set(_fmod_prefix FMODEX) | ||
| set(_fmod_inc fmod.h) | ||
| set(_fmod_libs fmodex fmodex64 fmodexL fmodexL64) | ||
|
|
||
| set(all_prebuilt_libs | ||
| chipmunk | ||
| curl | ||
| freetype2 | ||
| jpeg | ||
| png | ||
| tiff | ||
| webp | ||
| websockets | ||
| ) | ||
|
|
||
|
|
||
| if(MACOSX) | ||
| list(APPEND all_prebuilt_libs glfw3 zlib) | ||
| endif() | ||
|
|
||
| # We use MSVC instead of WINDOWS because it can be mingw that can't use our prebuilt libs | ||
| if(MSVC) | ||
| list(APPEND all_prebuilt_libs glfw3 sqlite3 gles icon MP3Decoder OggDecoder OpenalSoft zlib) | ||
| endif() | ||
|
|
||
| if(LINUX) | ||
| list(APPEND all_prebuilt_libs fmod) | ||
| endif() | ||
|
|
||
| # END CONFIG | ||
|
|
||
| foreach(_lib ${all_prebuilt_libs}) | ||
| if(_${_lib}_prefix) | ||
| set(_prefix ${_${_lib}_prefix}) | ||
| else() | ||
| # auto-prefix is uppercased name | ||
| string(TOUPPER ${_lib} _prefix) | ||
| endif() | ||
|
|
||
| set(roots | ||
| ${COCOS_EXTERNAL_DIR}/${_lib} | ||
| ${COCOS_EXTERNAL_DIR}/${PLATFORM_FOLDER}-specific/${_lib} | ||
| ) | ||
| foreach(_root ${roots}) | ||
| if(EXISTS ${_root}) | ||
| set(include_dir_candidates | ||
| ${_root}/include | ||
| ${_root}/include/${ARCH_DIR} | ||
| ${_root}/include/${PLATFORM_FOLDER} | ||
| ${_root}/include/${PLATFORM_FOLDER}/${ARCH_DIR} | ||
| ) | ||
| set(include_dirs) | ||
| foreach(_dir ${include_dir_candidates}) | ||
| if(EXISTS ${_dir}) | ||
| # find all include paths | ||
| if(_${_lib}_inc_paths) | ||
| set(_suffixes ${_${_lib}_inc_paths}) | ||
| else() | ||
| set(_suffixes include) | ||
| endif() | ||
| foreach(_inc_name ${_${_lib}_inc}) | ||
| unset(_inc_tmp CACHE) | ||
| find_path(_inc_tmp ${_inc_name} PATH_SUFFIXES ${_suffixes} PATHS ${_dir} NO_DEFAULT_PATH) | ||
| if(_inc_tmp) | ||
| list(APPEND include_dirs ${_inc_tmp}) | ||
| endif() | ||
| endforeach() | ||
| endif(EXISTS ${_dir}) | ||
| endforeach() | ||
| if(include_dirs) | ||
| set(${_prefix}_INCLUDE_DIRS ${include_dirs} CACHE PATH "Path to includes for ${_prefix}" FORCE) | ||
| endif() | ||
| #message(STATUS "${_lib} ${_prefix}_INCLUDE_DIRS: ${${_prefix}_INCLUDE_DIRS}") | ||
|
|
||
| set(lib_dir_candidates | ||
| ${_root}/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR} | ||
| ${_root}/prebuilt/${PLATFORM_FOLDER} | ||
| ${_root}/prebuilt/${PLATFORM_FOLDER}/release-lib | ||
| ${_root}/prebuilt/${ARCH_DIR} | ||
| ${_root}/libraries/${PLATFORM_FOLDER} | ||
| ${_root}/prebuilt | ||
| ) | ||
| set(libs) | ||
| foreach(_dir ${lib_dir_candidates}) | ||
| if(EXISTS ${_dir}) | ||
| # find all libs | ||
| foreach(_lib_name ${_${_lib}_libs}) | ||
| unset(_lib_tmp CACHE) | ||
| find_library(_lib_tmp ${_lib_name} PATHS ${_dir} NO_DEFAULT_PATH) | ||
| if(_lib_tmp) | ||
| list(APPEND libs ${_lib_tmp}) | ||
| endif() | ||
| endforeach() | ||
| endif(EXISTS ${_dir}) | ||
| endforeach() | ||
| if(libs) | ||
| set(${_prefix}_LIBRARIES ${libs} CACHE STRING "Libraries to link for ${_prefix}" FORCE) | ||
| endif() | ||
| #message(STATUS "${_lib} ${_prefix}_LIBRARIES: ${${_prefix}_LIBRARIES}") | ||
|
|
||
| if(${_prefix}_LIBRARIES AND ${_prefix}_INCLUDE_DIRS) | ||
| set(${_prefix}_FOUND YES) | ||
| endif() | ||
|
|
||
| endif(EXISTS ${_root}) | ||
| endforeach() | ||
| endforeach() |
| @@ -0,0 +1,86 @@ | ||
| #.rst: | ||
| # FindCURL | ||
| # -------- | ||
| # | ||
| # Find curl | ||
| # | ||
| # Find the native CURL headers and libraries. | ||
| # | ||
| # :: | ||
| # | ||
| # CURL_INCLUDE_DIRS - where to find curl/curl.h, etc. | ||
| # CURL_LIBRARIES - List of libraries when using curl. | ||
| # CURL_FOUND - True if curl found. | ||
| # CURL_VERSION_STRING - the version of curl found (since CMake 2.8.8) | ||
|
|
||
| #============================================================================= | ||
| # Copyright 2006-2009 Kitware, Inc. | ||
| # Copyright 2012 Rolf Eike Beer <eike@sf-mail.de> | ||
| # | ||
| # Distributed under the OSI-approved BSD License (the "License"); | ||
| # see accompanying file Copyright.txt for details. | ||
| # | ||
| # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| # See the License for more information. | ||
| #============================================================================= | ||
| # (To distribute this file outside of CMake, substitute the full | ||
| # License text for the above reference.) | ||
|
|
||
| set(CURL_LIBRARY_NAMES | ||
| curl | ||
| # Windows MSVC prebuilts: | ||
| curllib | ||
| libcurl_imp | ||
| curllib_static | ||
| # Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip): | ||
| libcurl | ||
| ) | ||
|
|
||
| find_package(PkgConfig) | ||
| if(PKG_CONFIG_FOUND) | ||
| pkg_search_module(CURL QUIET libcurl) | ||
| endif() | ||
|
|
||
| if(NOT CURL_FOUND) | ||
|
|
||
| # Look for the header file. | ||
| find_path(CURL_INCLUDE_DIR NAMES curl/curl.h) | ||
| mark_as_advanced(CURL_INCLUDE_DIR) | ||
|
|
||
| # Look for the library (sorted from most current/relevant entry to least). | ||
| find_library(CURL_LIBRARY NAMES | ||
| curl | ||
| # Windows MSVC prebuilts: | ||
| curllib | ||
| libcurl_imp | ||
| curllib_static | ||
| # Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip): | ||
| libcurl | ||
| ) | ||
| mark_as_advanced(CURL_LIBRARY) | ||
|
|
||
| if(CURL_INCLUDE_DIR) | ||
| foreach(_curl_version_header curlver.h curl.h) | ||
| if(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}") | ||
| file(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"") | ||
|
|
||
| string(REGEX REPLACE "^#define[\t ]+LIBCURL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" CURL_VERSION_STRING "${curl_version_str}") | ||
| unset(curl_version_str) | ||
| break() | ||
| endif() | ||
| endforeach() | ||
| endif() | ||
|
|
||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL | ||
| REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR | ||
| VERSION_VAR CURL_VERSION_STRING) | ||
|
|
||
| if(CURL_FOUND) | ||
| set(CURL_LIBRARIES ${CURL_LIBRARY}) | ||
| set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR}) | ||
| endif() | ||
|
|
||
| endif() | ||
|
|
| @@ -0,0 +1,79 @@ | ||
| #.rst: | ||
| # FindChipmunk | ||
| # ------------ | ||
| # | ||
| # Locate Chipmunk library | ||
| # | ||
| # This module defines | ||
| # | ||
| # :: | ||
| # | ||
| # CHIPMUNK_LIBRARIES, the library to link against | ||
| # CHIPMUNK_FOUND, if false, do not try to link to FREETYPE | ||
| # CHIPMUNK_INCLUDE_DIRS, where to find headers. | ||
| # This is the concatenation of the paths: | ||
| # CHIPMUNK_INCLUDE_DIR | ||
| # | ||
| #============================================================================= | ||
| # Copyright 2014-2014 Martell Malone | ||
| # | ||
| # Distributed under the OSI-approved BSD License (the "License"); | ||
| # see accompanying file Copyright.txt for details. | ||
| # | ||
| # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| # See the License for more information. | ||
| #============================================================================= | ||
| # (To distribute this file outside of CMake, substitute the full | ||
| # License text for the above reference.) | ||
|
|
||
| FIND_PATH(CHIPMUNK_INCLUDE_DIR chipmunk.h | ||
| HINTS | ||
| ENV CHIPMUNK_DIR | ||
| PATH_SUFFIXES include/chipmunk include | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw # Fink | ||
| /opt/local # DarwinPorts | ||
| /opt/csw # Blastwave | ||
| /opt | ||
| ) | ||
|
|
||
| FIND_LIBRARY(CHIPMUNK_LIBRARY | ||
| NAMES chipmunk libchipmunk | ||
| HINTS | ||
| ENV CHIPMUNK_DIR | ||
| PATH_SUFFIXES lib | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw | ||
| /opt/local | ||
| /opt/csw | ||
| /opt | ||
| ) | ||
|
|
||
| set(CHIPMUNK_INCLUDE_DIRS "${CHIPMUNK_INCLUDE_DIR}") | ||
|
|
||
| IF(CHIPMUNK_LIBRARY) | ||
| # include the math library for Unix | ||
| IF(UNIX AND NOT APPLE) | ||
| FIND_LIBRARY(CHIPMUNK_MATH_LIBRARY m) | ||
| SET(CHIPMUNK_LIBRARIES "${CHIPMUNK_LIBRARY};${CHIPMUNK_MATH_LIBRARY}" CACHE STRING "Chipmunk Libraries") | ||
| # For Windows and Mac, don't need to explicitly include the math library | ||
| ELSE(UNIX AND NOT APPLE) | ||
| SET( CHIPMUNK_LIBRARIES "${CHIPMUNK_LIBRARY}" CACHE STRING "Chipmunk Libraries") | ||
| ENDIF(UNIX AND NOT APPLE) | ||
| ENDIF(CHIPMUNK_LIBRARY) | ||
|
|
||
| INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| # handle the QUIETLY and REQUIRED arguments and set CHIPMUNK_FOUND to TRUE if | ||
| # all listed variables are TRUE | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(Chipmunk DEFAULT_MSG CHIPMUNK_LIBRARIES CHIPMUNK_INCLUDE_DIR) | ||
|
|
||
| MARK_AS_ADVANCED(CHIPMUNK_INCLUDE_DIR CHIPMUNK_LIBRARIES CHIPMUNK_LIBRARY CHIPMUNK_MATH_LIBRARY) |
| @@ -0,0 +1,51 @@ | ||
| #.rst: | ||
| # FindFMODEX | ||
| # ------------ | ||
| # | ||
| # Locate FMOD Ex library | ||
| # | ||
| # This module defines | ||
| # | ||
| # :: | ||
| # | ||
| # FMODEX_LIBRARIES, the library to link against | ||
| # FMODEX_FOUND, if false, do not try to link to fmodex | ||
| # FMODEX_INCLUDE_DIRS, where to find headers. | ||
| # | ||
|
|
||
| find_path(FMODEX_INCLUDE_DIR fmod.h | ||
| HINTS ENV FMODEX_DIR | ||
| PATH_SUFFIXES include/fmodex include | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw # Fink | ||
| /opt/local # DarwinPorts | ||
| /opt/csw # Blastwave | ||
| /opt | ||
| ) | ||
|
|
||
| find_library(FMODEX_LIBRARY NAMES fmodex fmodex64 | ||
| HINTS ENV FMODEX_DIR | ||
| PATH_SUFFIXES lib | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw # Fink | ||
| /opt/local # DarwinPorts | ||
| /opt/csw # Blastwave | ||
| /opt | ||
| ) | ||
|
|
||
| set(FMODEX_INCLUDE_DIRS "${FMODEX_INCLUDE_DIR}") | ||
| set(FMODEX_LIBRARIES "${FMODEX_LIBRARY}") | ||
|
|
||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| find_package_handle_standard_args(FMODEX DEFAULT_MSG FMODEX_LIBRARIES FMODEX_INCLUDE_DIRS) | ||
|
|
||
| mark_as_advanced(FMODEX_INCLUDE_DIR FMODEX_LIBRARY FMODEX_INCLUDE_DIRS FMODEX_LIBRARIES) | ||
|
|
| @@ -0,0 +1,17 @@ | ||
| # FindFontconfig | ||
| # -------------- | ||
| # | ||
| # Locate Fontconfig library | ||
| # | ||
|
|
||
| if(NOT FONTCONFIG_FOUND) | ||
| find_package(PkgConfig) | ||
| pkg_search_module(FONTCONFIG fontconfig) | ||
| endif() | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(Fontconfig | ||
| REQUIRED_VARS FONTCONFIG_FOUND | ||
| VERSION_VAR FONTCONFIG_VERSION | ||
| ) | ||
|
|
| @@ -0,0 +1,168 @@ | ||
| #.rst: | ||
| # FindFreetype | ||
| # ------------ | ||
| # | ||
| # Locate FreeType library | ||
| # | ||
| # This module defines | ||
| # | ||
| # :: | ||
| # | ||
| # FREETYPE_LIBRARIES, the library to link against | ||
| # FREETYPE_FOUND, if false, do not try to link to FREETYPE | ||
| # FREETYPE_INCLUDE_DIRS, where to find headers. | ||
| # FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) | ||
| # This is the concatenation of the paths: | ||
| # FREETYPE_INCLUDE_DIR_ft2build | ||
| # FREETYPE_INCLUDE_DIR_freetype2 | ||
| # | ||
| # | ||
| # | ||
| # $FREETYPE_DIR is an environment variable that would correspond to the | ||
| # ./configure --prefix=$FREETYPE_DIR used in building FREETYPE. | ||
|
|
||
| #============================================================================= | ||
| # Copyright 2007-2009 Kitware, Inc. | ||
| # | ||
| # Distributed under the OSI-approved BSD License (the "License"); | ||
| # see accompanying file Copyright.txt for details. | ||
| # | ||
| # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| # See the License for more information. | ||
| #============================================================================= | ||
| # (To distribute this file outside of CMake, substitute the full | ||
| # License text for the above reference.) | ||
|
|
||
| # Created by Eric Wing. | ||
| # Modifications by Alexander Neundorf. | ||
| # This file has been renamed to "FindFreetype.cmake" instead of the correct | ||
| # "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. | ||
|
|
||
| # Try find freetype for our arch in external folder | ||
| #todo: fix location of freetype includes for linux android on cocos prebuilt repo | ||
| #i.e we should not need to include an extra dir of /freetype2 | ||
|
|
||
| # Try pkg-config first (because it provided deps info) | ||
| if(NOT FREETYPE_FOUND) | ||
| find_package(PkgConfig) | ||
| pkg_search_module(FREETYPE freetype2) | ||
| endif() | ||
| if(NOT FREETYPE_FOUND) | ||
|
|
||
| # Ugh, FreeType seems to use some #include trickery which | ||
| # makes this harder than it should be. It looks like they | ||
| # put ft2build.h in a common/easier-to-find location which | ||
| # then contains a #include to a more specific header in a | ||
| # more specific location (#include <freetype/config/ftheader.h>). | ||
| # Then from there, they need to set a bunch of #define's | ||
| # so you can do something like: | ||
| # #include FT_FREETYPE_H | ||
| # Unfortunately, using CMake's mechanisms like include_directories() | ||
| # wants explicit full paths and this trickery doesn't work too well. | ||
| # I'm going to attempt to cut out the middleman and hope | ||
| # everything still works. | ||
| find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h | ||
| HINTS | ||
| ENV FREETYPE_DIR | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /usr/X11R6 | ||
| /usr/local/X11R6 | ||
| /usr/local/X11 | ||
| /usr/freeware | ||
| ENV GTKMM_BASEPATH | ||
| [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] | ||
| [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] | ||
| PATH_SUFFIXES include/freetype2 include | ||
| ) | ||
|
|
||
| find_path(FREETYPE_INCLUDE_DIR_freetype2 | ||
| NAMES | ||
| freetype/config/ftheader.h | ||
| config/ftheader.h | ||
| HINTS | ||
| ENV FREETYPE_DIR | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /usr/X11R6 | ||
| /usr/local/X11R6 | ||
| /usr/local/X11 | ||
| /usr/freeware | ||
| ENV GTKMM_BASEPATH | ||
| [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] | ||
| [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] | ||
| PATH_SUFFIXES include/freetype2 include | ||
| ) | ||
|
|
||
| find_library(FREETYPE_LIBRARY | ||
| NAMES freetype libfreetype freetype219 | ||
| HINTS | ||
| ENV FREETYPE_DIR | ||
| PATH_SUFFIXES lib | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /usr/X11R6 | ||
| /usr/local/X11R6 | ||
| /usr/local/X11 | ||
| /usr/freeware | ||
| ENV GTKMM_BASEPATH | ||
| [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] | ||
| [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] | ||
| ) | ||
|
|
||
| # set the user variables | ||
| if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) | ||
| set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") | ||
| list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS) | ||
| endif() | ||
| set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") | ||
|
|
||
| if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") | ||
| set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") | ||
| elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") | ||
| set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") | ||
| endif() | ||
|
|
||
| if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H) | ||
| file(STRINGS "${FREETYPE_H}" freetype_version_str | ||
| REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") | ||
|
|
||
| unset(FREETYPE_VERSION_STRING) | ||
| foreach(VPART MAJOR MINOR PATCH) | ||
| foreach(VLINE ${freetype_version_str}) | ||
| if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}") | ||
| string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1" | ||
| FREETYPE_VERSION_PART "${VLINE}") | ||
| if(FREETYPE_VERSION_STRING) | ||
| set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") | ||
| else() | ||
| set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") | ||
| endif() | ||
| unset(FREETYPE_VERSION_PART) | ||
| endif() | ||
| endforeach() | ||
| endforeach() | ||
| endif() | ||
|
|
||
| set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY}) | ||
|
|
||
| # handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if | ||
| # all listed variables are TRUE | ||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype | ||
| REQUIRED_VARS FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIRS | ||
| VERSION_VAR FREETYPE_VERSION_STRING) | ||
|
|
||
| endif(NOT FREETYPE_FOUND) | ||
|
|
||
| mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) |
| @@ -0,0 +1,156 @@ | ||
| #.rst: | ||
| # FindGLFW3 | ||
| # ------------ | ||
| # | ||
| # Locate glfw3 library | ||
| # | ||
| # This module defines | ||
| # | ||
| # :: | ||
| # | ||
| # GLFW3_LIBRARIES, the library to link against | ||
| # GLFW3_FOUND, if false, do not try to link to FREETYPE | ||
| # GLFW3_INCLUDE_DIRS, where to find headers. | ||
| # This is the concatenation of the paths: | ||
| # GLFW3_INCLUDE_DIR | ||
| # | ||
| #============================================================================= | ||
| # Copyright 2014-2014 Martell Malone | ||
| # | ||
| # Distributed under the OSI-approved BSD License (the "License"); | ||
| # see accompanying file Copyright.txt for details. | ||
| # | ||
| # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| # See the License for more information. | ||
| #============================================================================= | ||
| # (To distribute this file outside of CMake, substitute the full | ||
| # License text for the above reference.) | ||
|
|
||
| # glfw has special requirements for linking (from docs: http://www.glfw.org/docs/latest/build.html) | ||
| # MINGW or MSVC + static "glfw3" -> link: opengl32, gdi32 (plus glu32 if use GLU) | ||
| # MINGW or MSVC + dynamic "glfw3dll" (but this not true ;) -> -DGLFW_DLL link: no | ||
| # UNIX + static -> pkg-config --static --libs | ||
| # UNIX + dynamic -> pkg-config --libs | ||
| # So... if we find dynamic version, no problems, but if we find static, we need to determine deps | ||
| # but cmake can't simply say to us what kind of library it found. So we try to find static version | ||
| # first, and then if nothing found, we repeat search for dynamic | ||
|
|
||
| find_package(PkgConfig) | ||
| if(PKG_CONFIG_FOUND) | ||
| message(STATUS "PkgConfig found") | ||
| else() | ||
| message(STATUS "PkgConfig not found, if you have only static glfw library, you build can fail") | ||
| endif() | ||
|
|
||
| if(PKG_CONFIG_FOUND) | ||
| # Save some global stuff that we change, to revert after work has been done | ||
| set(_saved_PKG_CONFIG_PATH "$ENV{PKG_CONFIG_PATH}") | ||
| set(_saved_CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}") | ||
|
|
||
| # add /usr/local/lib/pkgconfig to pkg-config search path (some linuxes do not do that, but glfw installs to taht prefix by default) | ||
| file(TO_CMAKE_PATH "$ENV{PKG_CONFIG_PATH}" PKG_CONFIG_PATH) | ||
| list(APPEND PKG_CONFIG_PATH "/usr/local/lib/pkgconfig") | ||
| file(TO_NATIVE_PATH "${PKG_CONFIG_PATH}" new_pkg_config_path) | ||
| set(ENV{PKG_CONFIG_PATH} "${new_pkg_config_path}") | ||
|
|
||
| # now try to find glfw with pkg-config | ||
| pkg_check_modules(PC_GLFW3 glfw3) | ||
| if(PC_GLFW3_FOUND) | ||
|
|
||
| # try to find static library | ||
| set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
| find_library(GLFW3_STATIC_LIBRARY NAMES glfw3 libglfw3 PATHS ${PC_GLFW3_LIBRARY_DIRS} NO_DEFAULT_PATH) | ||
| find_library(GLFW3_STATIC_LIBRARY NAMES glfw3 libglfw3 PATHS ${PC_GLFW3_LIBRARY_DIRS}) | ||
| # also we include glfw3.h header, not GLFW/glfw3.h :( | ||
| find_path(GLFW3_INCLUDE_DIRS glfw3.h PATH_SUFFIXES GLFW PATHS ${PC_GLFW3_INCLUDE_DIRS} NO_DEFAULT_PATH) | ||
| find_path(GLFW3_INCLUDE_DIRS glfw3.h PATH_SUFFIXES GLFW PATHS ${PC_GLFW3_INCLUDE_DIRS}) | ||
|
|
||
| if(GLFW3_STATIC_LIBRARY) | ||
| # glfw3 is static | ||
| set(GLFW3_LIBRARIES ${PC_GLFW3_STATIC_LIBRARIES}) | ||
| set(GLFW3_LIBRARY_DIRS ${PC_GLFW3_STATIC_LIBRARY_DIRS}) | ||
|
|
||
| # We also need to add any other LDFLAGS, but with additional fixup for Apple frameworks :( | ||
| if(APPLE) | ||
| unset(_is_framework) | ||
| foreach(_arg ${PC_GLFW3_STATIC_LDFLAGS_OTHER}) | ||
| if(_is_framework) | ||
| set(var FRAMEWORK_${_arg}_LIBRARY) | ||
| find_library(${var} ${_arg}) | ||
| if(${var}) | ||
| list(APPEND GLFW3_LIBRARIES ${${var}}) | ||
| endif() | ||
| unset(var) | ||
| unset(_is_framework) | ||
| else() | ||
| if(_arg STREQUAL "-framework") | ||
| set(_is_framework 1) | ||
| else() | ||
| list(APPEND GLFW3_LIBRARIES ${_arg}) | ||
| endif() | ||
| endif() | ||
| endforeach() | ||
| else(APPLE) | ||
| list(APPEND GLFW3_LIBRARIES ${PC_GLFW3_STATIC_LDFLAGS_OTHER}) | ||
| endif(APPLE) | ||
|
|
||
| else() | ||
| # glfw3 is dynamic | ||
| set(GLFW3_DEFINITIONS -DGLFW_DLL) | ||
| set(GLFW3_LIBRARIES ${PC_GLFW3_LIBRARIES}) | ||
| set(GLFW3_LIBRARY_DIRS ${PC_GLFW3_LIBRARY_DIRS}) | ||
|
|
||
| endif() | ||
| set(GLFW3_FOUND 1) | ||
|
|
||
| endif() | ||
|
|
||
| # Restore global stuff | ||
| set(CMAKE_FIND_LIBRARY_SUFFIXES "${_saved_CMAKE_FIND_LIBRARY_SUFFIXES}") | ||
| set(ENV{PKG_CONFIG_PATH} "${_saved_PKG_CONFIG_PATH}") | ||
| endif(PKG_CONFIG_FOUND) | ||
|
|
||
| # fallback if pkg-config method not work | ||
| if(NOT GLFW3_FOUND) | ||
|
|
||
| find_path(GLFW3_INCLUDE_DIR glfw3.h | ||
| HINTS | ||
| ENV GLFW3_DIR | ||
| PATH_SUFFIXES include/GLFW include | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw # Fink | ||
| /opt/local # DarwinPorts | ||
| /opt/csw # Blastwave | ||
| /opt | ||
| ) | ||
|
|
||
| find_library(GLFW3_LIBRARY | ||
| NAMES glfw3 libglfw3 glfw | ||
| HINTS | ||
| ENV GLFW3_DIR | ||
| PATH_SUFFIXES lib | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw | ||
| /opt/local | ||
| /opt/csw | ||
| /opt | ||
| ) | ||
|
|
||
| set(GLFW3_INCLUDE_DIRS "${GLFW3_INCLUDE_DIR}") | ||
| set(GLFW3_LIBRARIES "${GLFW3_LIBRARY}") | ||
|
|
||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| find_package_handle_standard_args(GLFW3 DEFAULT_MSG GLFW3_LIBRARIES GLFW3_INCLUDE_DIR) | ||
|
|
||
| endif() | ||
|
|
||
| mark_as_advanced(GLFW3_INCLUDE_DIR GLFW3_LIBRARIES GLFW3_LIBRARY) |
| @@ -0,0 +1,49 @@ | ||
| #.rst: | ||
| # FindJPEG | ||
| # -------- | ||
| # | ||
| # Find JPEG | ||
| # | ||
| # Find the native JPEG includes and library This module defines | ||
| # | ||
| # :: | ||
| # | ||
| # JPEG_INCLUDE_DIRS, where to find jpeglib.h, etc. | ||
| # JPEG_LIBRARIES, the libraries needed to use JPEG. | ||
| # JPEG_FOUND, If false, do not try to use JPEG. | ||
| # | ||
| # also defined, but not for general use are | ||
| # | ||
| # :: | ||
| # | ||
| # JPEG_LIBRARY, where to find the JPEG library. | ||
|
|
||
| #============================================================================= | ||
| # Copyright 2001-2009 Kitware, Inc. | ||
| # | ||
| # Distributed under the OSI-approved BSD License (the "License"); | ||
| # see accompanying file Copyright.txt for details. | ||
| # | ||
| # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| # See the License for more information. | ||
| #============================================================================= | ||
| # (To distribute this file outside of CMake, substitute the full | ||
| # License text for the above reference.) | ||
|
|
||
| find_path(JPEG_INCLUDE_DIR jpeglib.h) | ||
|
|
||
| set(JPEG_NAMES ${JPEG_NAMES} jpeg) | ||
| find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} ) | ||
|
|
||
| # handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if | ||
| # all listed variables are TRUE | ||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR) | ||
|
|
||
| if(JPEG_FOUND) | ||
| set(JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR}) | ||
| set(JPEG_LIBRARIES ${JPEG_LIBRARY}) | ||
| endif() | ||
|
|
||
| mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIRS ) |
| @@ -0,0 +1,60 @@ | ||
| #.rst: | ||
| # FindMINIZIP | ||
| # ------------ | ||
| # | ||
| # Locate minizip library (from zlib package) | ||
| # | ||
| # This module defines | ||
| # | ||
| # :: | ||
| # | ||
| # MINIZIP_LIBRARIES, the library to link against | ||
| # MINIZIP_FOUND, if false, do not try to link to fmodex | ||
| # MINIZIP_INCLUDE_DIRS, where to find headers. | ||
| # | ||
|
|
||
| # Try pkg-config first | ||
| if(NOT MINIZIP_LIBRARY AND NOT MINIZIP_INCLUDE_DIR) | ||
| find_package(PkgConfig) | ||
| pkg_search_module(MINIZIP minizip) | ||
| if(MINIZIP_FOUND) | ||
| return() | ||
| endif() | ||
| endif() | ||
|
|
||
| find_path(MINIZIP_INCLUDE_DIR minizip/unzip.h | ||
| HINTS ENV MINIZIP_DIR | ||
| PATH_SUFFIXES include | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw # Fink | ||
| /opt/local # DarwinPorts | ||
| /opt/csw # Blastwave | ||
| /opt | ||
| ) | ||
|
|
||
| find_library(MINIZIP_LIBRARY NAMES minizip libminizip | ||
| HINTS ENV MINIZIP_DIR | ||
| PATH_SUFFIXES lib | ||
| PATHS | ||
| ~/Library/Frameworks | ||
| /Library/Frameworks | ||
| /usr/local | ||
| /usr | ||
| /sw # Fink | ||
| /opt/local # DarwinPorts | ||
| /opt/csw # Blastwave | ||
| /opt | ||
| ) | ||
|
|
||
| set(MINIZIP_INCLUDE_DIRS "${MINIZIP_INCLUDE_DIR}") | ||
| set(MINIZIP_LIBRARIES "${MINIZIP_LIBRARY}") | ||
|
|
||
| include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) | ||
| find_package_handle_standard_args(MINIZIP DEFAULT_MSG MINIZIP_LIBRARIES MINIZIP_INCLUDE_DIRS) | ||
|
|
||
| mark_as_advanced(MINIZIP_INCLUDE_DIR MINIZIP_LIBRARY) | ||
|
|
| @@ -0,0 +1,17 @@ | ||
| # - Find mpg123 | ||
| # Find the native mpg123 includes and libraries | ||
| # | ||
| # MPG123_INCLUDE_DIRS - where to find mpg123.h, etc. | ||
| # MPG123_LIBRARIES - List of libraries when using mpg123. | ||
| # MPG123_FOUND - True if mpg123 found. | ||
|
|
||
| find_path(MPG123_INCLUDE_DIR mpg123.h) | ||
| find_library(MPG123_LIBRARY NAMES mpg123 libmpg123) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(MPG123 DEFAULT_MSG MPG123_INCLUDE_DIR MPG123_LIBRARY) | ||
|
|
||
| set(MPG123_INCLUDE_DIRS ${MPG123_INCLUDE_DIR}) | ||
| set(MPG123_LIBRARIES ${MPG123_LIBRARY}) | ||
|
|
||
| mark_as_advanced(MPG123_INCLUDE_DIR MPG123_LIBRARY) |
| @@ -0,0 +1,20 @@ | ||
| # - Find ogg | ||
| # Find the native ogg includes and libraries | ||
| # | ||
| # OGG_INCLUDE_DIRS - where to find ogg.h, etc. | ||
| # OGG_LIBRARIES - List of libraries when using ogg. | ||
| # OGG_FOUND - True if ogg found. | ||
|
|
||
| find_path(OGG_INCLUDE_DIR ogg/ogg.h) | ||
| # MSVC built ogg may be named ogg_static. | ||
| # The provided project files name the library with the lib prefix. | ||
| find_library(OGG_LIBRARY NAMES ogg ogg_static libogg libogg_static) | ||
| # Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND | ||
| # to TRUE if all listed variables are TRUE. | ||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIR OGG_LIBRARY) | ||
|
|
||
| set(OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR}) | ||
| set(OGG_LIBRARIES ${OGG_LIBRARY}) | ||
|
|
||
| mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY) |