2016-03-03 08:51:54 +08:00
|
|
|
#/****************************************************************************
|
|
|
|
# Copyright (c) 2015 Chukong Technologies Inc.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
# ****************************************************************************/
|
2014-09-17 11:23:59 +08:00
|
|
|
|
|
|
|
if(WINDOWS)
|
|
|
|
|
|
|
|
set(COCOS_PLATFORM_SPECIFIC_SRC
|
|
|
|
platform/win32/CCStdC-win32.cpp
|
2016-07-28 09:57:29 +08:00
|
|
|
platform/win32/CCUtils-win32.cpp
|
2014-09-17 11:23:59 +08:00
|
|
|
platform/win32/CCFileUtils-win32.cpp
|
|
|
|
platform/win32/CCCommon-win32.cpp
|
|
|
|
platform/win32/CCApplication-win32.cpp
|
|
|
|
platform/win32/CCDevice-win32.cpp
|
2015-02-07 04:39:50 +08:00
|
|
|
platform/win32/inet_pton_mingw.cpp
|
2014-09-20 08:46:39 +08:00
|
|
|
platform/desktop/CCGLViewImpl-desktop.cpp
|
2014-09-17 11:23:59 +08:00
|
|
|
)
|
|
|
|
|
2014-10-15 05:19:29 +08:00
|
|
|
elseif(MACOSX OR APPLE)
|
2014-09-17 11:23:59 +08:00
|
|
|
|
|
|
|
set(COCOS_PLATFORM_SPECIFIC_SRC
|
|
|
|
platform/mac/CCApplication-mac.mm
|
|
|
|
platform/mac/CCCommon-mac.mm
|
|
|
|
platform/mac/CCDevice-mac.mm
|
|
|
|
platform/apple/CCLock-apple.cpp
|
|
|
|
platform/apple/CCFileUtils-apple.mm
|
2014-09-20 00:56:51 +08:00
|
|
|
platform/apple/CCThread-apple.mm
|
2014-09-20 08:46:39 +08:00
|
|
|
platform/desktop/CCGLViewImpl-desktop.cpp
|
2014-09-17 11:23:59 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
elseif(LINUX)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
/usr/include
|
|
|
|
/usr/include/GLFW
|
|
|
|
/usr/local/include/GLFW
|
|
|
|
)
|
|
|
|
|
|
|
|
set(COCOS_PLATFORM_SPECIFIC_SRC
|
|
|
|
platform/linux/CCStdC-linux.cpp
|
|
|
|
platform/linux/CCFileUtils-linux.cpp
|
|
|
|
platform/linux/CCCommon-linux.cpp
|
|
|
|
platform/linux/CCApplication-linux.cpp
|
|
|
|
platform/linux/CCDevice-linux.cpp
|
2014-09-20 08:46:39 +08:00
|
|
|
platform/desktop/CCGLViewImpl-desktop.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
elseif(ANDROID)
|
|
|
|
|
|
|
|
set(COCOS_PLATFORM_SPECIFIC_SRC
|
|
|
|
platform/android/CCApplication-android.cpp
|
|
|
|
platform/android/CCCommon-android.cpp
|
|
|
|
platform/android/CCGLViewImpl-android.cpp
|
|
|
|
platform/android/CCFileUtils-android.cpp
|
2016-03-03 08:51:54 +08:00
|
|
|
platform/android/CCEnhanceAPI-android.cpp
|
|
|
|
platform/android/jni/JniHelper.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(COCOS2DX_ANDROID_STATIC
|
|
|
|
platform/android/CCDevice-android.cpp
|
2014-09-20 08:46:39 +08:00
|
|
|
platform/android/javaactivity-android.cpp
|
2016-03-03 08:51:54 +08:00
|
|
|
platform/android/jni/TouchesJni.cpp
|
2014-09-20 08:46:39 +08:00
|
|
|
platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxAccelerometer.cpp
|
|
|
|
platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp
|
|
|
|
platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp
|
|
|
|
platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp
|
2016-03-21 21:04:06 +08:00
|
|
|
|
2014-09-17 11:23:59 +08:00
|
|
|
)
|
|
|
|
|
2016-03-03 08:51:54 +08:00
|
|
|
add_library(cocos2dxandroid_static STATIC ${COCOS2DX_ANDROID_STATIC})
|
|
|
|
set_property(TARGET cocos2dxandroid_static PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
2015-10-23 07:12:37 +08:00
|
|
|
set_target_properties(cocos2dxandroid_static
|
|
|
|
PROPERTIES
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
|
|
VERSION "${COCOS2D_X_VERSION}"
|
|
|
|
)
|
2016-03-03 08:51:54 +08:00
|
|
|
|
2014-09-17 11:23:59 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
#leave andatory external stuff here also
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
../external/ConvertUTF
|
|
|
|
../external/edtaa3func
|
2015-04-23 00:51:47 +08:00
|
|
|
../external/poly2tri
|
|
|
|
../external/poly2tri/common
|
|
|
|
../external/poly2tri/sweep
|
2014-09-17 11:23:59 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(COCOS_PLATFORM_SRC
|
|
|
|
|
|
|
|
platform/CCSAXParser.cpp
|
|
|
|
platform/CCThread.cpp
|
|
|
|
platform/CCGLView.cpp
|
|
|
|
platform/CCFileUtils.cpp
|
|
|
|
platform/CCImage.cpp
|
|
|
|
../external/edtaa3func/edtaa3func.cpp
|
|
|
|
../external/ConvertUTF/ConvertUTFWrapper.cpp
|
|
|
|
../external/ConvertUTF/ConvertUTF.c
|
2015-04-23 00:51:47 +08:00
|
|
|
../external/poly2tri/common/shapes.cc
|
|
|
|
../external/poly2tri/sweep/advancing_front.cc
|
|
|
|
../external/poly2tri/sweep/cdt.cc
|
|
|
|
../external/poly2tri/sweep/sweep_context.cc
|
|
|
|
../external/poly2tri/sweep/sweep.cc
|
2014-09-17 11:23:59 +08:00
|
|
|
${COCOS_PLATFORM_SPECIFIC_SRC}
|
|
|
|
|
|
|
|
)
|