axmol/cocos/platform/CMakeLists.txt

127 lines
4.0 KiB
CMake
Raw Normal View History

Squashed commit of the following: commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 15:19:48 2016 -0800 uses new naming convention for projects uses _ instead of - commit f97ba56608d48b17909649c8617ba9047b566196 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:49:22 2016 -0800 fooling cmake for real commit 20c2560f75eab952e5131b484284bf20cb07fe07 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:43:05 2016 -0800 fooling cmake commit a0ada44bc82941830f6c71219a1492d28c28c306 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:26:59 2016 -0800 makes CMake for Mac happy commit 656b4f5e2dd741215a4699db979fe1b0dce60298 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 13:50:15 2016 -0800 linux fix commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 11:18:18 2016 -0800 links correctly! commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 17:44:58 2016 -0800 Squashed commit of the following: commit 2ef52723dae44204c047cb177d5a5670fb659c79 Merge: 8a5c998 25cf1f1 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 16:54:04 2016 -0800 Merge branch 'v3' into cmake_android commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:34:46 2016 -0800 Fix module name in Android template to match CMake project. commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:27:45 2016 -0800 Add missing platform specific source file to CMake project. commit 705389ac6582107a381d0cbc56268eaa98ffc5c3 Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:21:12 2016 -0800 Find AndroidNdkModules.cmake relative to android.toolchain.cmake. commit a10075e2cb30af2e1f9a30da99efac880658ad6b Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:03:11 2016 -0800 Remove cpp-empty-test from project templates. commit e070fcbf210b8628f75785e738202a80a95ac0ff Author: WenhaiLin <wenhai.lin@chukong-inc.com> Date: Mon Aug 31 09:56:03 2015 +0800 Fix CMake for Android Target
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.
# ****************************************************************************/
if(WINDOWS)
set(COCOS_PLATFORM_SPECIFIC_SRC
platform/win32/CCStdC-win32.cpp
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
platform/desktop/CCGLViewImpl-desktop.cpp
)
elseif(MACOSX OR APPLE)
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
platform/apple/CCThread-apple.mm
platform/desktop/CCGLViewImpl-desktop.cpp
)
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
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
Squashed commit of the following: commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 15:19:48 2016 -0800 uses new naming convention for projects uses _ instead of - commit f97ba56608d48b17909649c8617ba9047b566196 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:49:22 2016 -0800 fooling cmake for real commit 20c2560f75eab952e5131b484284bf20cb07fe07 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:43:05 2016 -0800 fooling cmake commit a0ada44bc82941830f6c71219a1492d28c28c306 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:26:59 2016 -0800 makes CMake for Mac happy commit 656b4f5e2dd741215a4699db979fe1b0dce60298 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 13:50:15 2016 -0800 linux fix commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 11:18:18 2016 -0800 links correctly! commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 17:44:58 2016 -0800 Squashed commit of the following: commit 2ef52723dae44204c047cb177d5a5670fb659c79 Merge: 8a5c998 25cf1f1 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 16:54:04 2016 -0800 Merge branch 'v3' into cmake_android commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:34:46 2016 -0800 Fix module name in Android template to match CMake project. commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:27:45 2016 -0800 Add missing platform specific source file to CMake project. commit 705389ac6582107a381d0cbc56268eaa98ffc5c3 Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:21:12 2016 -0800 Find AndroidNdkModules.cmake relative to android.toolchain.cmake. commit a10075e2cb30af2e1f9a30da99efac880658ad6b Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:03:11 2016 -0800 Remove cpp-empty-test from project templates. commit e070fcbf210b8628f75785e738202a80a95ac0ff Author: WenhaiLin <wenhai.lin@chukong-inc.com> Date: Mon Aug 31 09:56:03 2015 +0800 Fix CMake for Android Target
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
platform/android/javaactivity-android.cpp
Squashed commit of the following: commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 15:19:48 2016 -0800 uses new naming convention for projects uses _ instead of - commit f97ba56608d48b17909649c8617ba9047b566196 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:49:22 2016 -0800 fooling cmake for real commit 20c2560f75eab952e5131b484284bf20cb07fe07 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:43:05 2016 -0800 fooling cmake commit a0ada44bc82941830f6c71219a1492d28c28c306 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:26:59 2016 -0800 makes CMake for Mac happy commit 656b4f5e2dd741215a4699db979fe1b0dce60298 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 13:50:15 2016 -0800 linux fix commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 11:18:18 2016 -0800 links correctly! commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 17:44:58 2016 -0800 Squashed commit of the following: commit 2ef52723dae44204c047cb177d5a5670fb659c79 Merge: 8a5c998 25cf1f1 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 16:54:04 2016 -0800 Merge branch 'v3' into cmake_android commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:34:46 2016 -0800 Fix module name in Android template to match CMake project. commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:27:45 2016 -0800 Add missing platform specific source file to CMake project. commit 705389ac6582107a381d0cbc56268eaa98ffc5c3 Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:21:12 2016 -0800 Find AndroidNdkModules.cmake relative to android.toolchain.cmake. commit a10075e2cb30af2e1f9a30da99efac880658ad6b Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:03:11 2016 -0800 Remove cpp-empty-test from project templates. commit e070fcbf210b8628f75785e738202a80a95ac0ff Author: WenhaiLin <wenhai.lin@chukong-inc.com> Date: Mon Aug 31 09:56:03 2015 +0800 Fix CMake for Android Target
2016-03-03 08:51:54 +08:00
platform/android/jni/TouchesJni.cpp
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
)
Squashed commit of the following: commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 15:19:48 2016 -0800 uses new naming convention for projects uses _ instead of - commit f97ba56608d48b17909649c8617ba9047b566196 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:49:22 2016 -0800 fooling cmake for real commit 20c2560f75eab952e5131b484284bf20cb07fe07 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:43:05 2016 -0800 fooling cmake commit a0ada44bc82941830f6c71219a1492d28c28c306 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:26:59 2016 -0800 makes CMake for Mac happy commit 656b4f5e2dd741215a4699db979fe1b0dce60298 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 13:50:15 2016 -0800 linux fix commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 11:18:18 2016 -0800 links correctly! commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 17:44:58 2016 -0800 Squashed commit of the following: commit 2ef52723dae44204c047cb177d5a5670fb659c79 Merge: 8a5c998 25cf1f1 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 16:54:04 2016 -0800 Merge branch 'v3' into cmake_android commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:34:46 2016 -0800 Fix module name in Android template to match CMake project. commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:27:45 2016 -0800 Add missing platform specific source file to CMake project. commit 705389ac6582107a381d0cbc56268eaa98ffc5c3 Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:21:12 2016 -0800 Find AndroidNdkModules.cmake relative to android.toolchain.cmake. commit a10075e2cb30af2e1f9a30da99efac880658ad6b Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:03:11 2016 -0800 Remove cpp-empty-test from project templates. commit e070fcbf210b8628f75785e738202a80a95ac0ff Author: WenhaiLin <wenhai.lin@chukong-inc.com> Date: Mon Aug 31 09:56:03 2015 +0800 Fix CMake for Android Target
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)
set_target_properties(cocos2dxandroid_static
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
VERSION "${COCOS2D_X_VERSION}"
)
Squashed commit of the following: commit 59e43a3c80f4af8998e4a14f6463bd7a91617d5f Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 15:19:48 2016 -0800 uses new naming convention for projects uses _ instead of - commit f97ba56608d48b17909649c8617ba9047b566196 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:49:22 2016 -0800 fooling cmake for real commit 20c2560f75eab952e5131b484284bf20cb07fe07 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:43:05 2016 -0800 fooling cmake commit a0ada44bc82941830f6c71219a1492d28c28c306 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 14:26:59 2016 -0800 makes CMake for Mac happy commit 656b4f5e2dd741215a4699db979fe1b0dce60298 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 13:50:15 2016 -0800 linux fix commit fa98aeac8505c764f4a69f15c8a8ff1123fad2a3 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Wed Mar 2 11:18:18 2016 -0800 links correctly! commit 9c56ce7143d3a35b44d33f246cec093ca9eaa7d9 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 17:44:58 2016 -0800 Squashed commit of the following: commit 2ef52723dae44204c047cb177d5a5670fb659c79 Merge: 8a5c998 25cf1f1 Author: Ricardo Quesada <ricardoquesada@gmail.com> Date: Tue Mar 1 16:54:04 2016 -0800 Merge branch 'v3' into cmake_android commit 8a5c9981192e344fffc9f14be5cb14f66eccfa24 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:34:46 2016 -0800 Fix module name in Android template to match CMake project. commit be85e19e852a9d5fbd6c58cea60c75fe47a5a576 Author: Chaoren Lin <chaorenl@google.com> Date: Thu Feb 11 18:27:45 2016 -0800 Add missing platform specific source file to CMake project. commit 705389ac6582107a381d0cbc56268eaa98ffc5c3 Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:21:12 2016 -0800 Find AndroidNdkModules.cmake relative to android.toolchain.cmake. commit a10075e2cb30af2e1f9a30da99efac880658ad6b Author: Chaoren Lin <chaorenl@google.com> Date: Wed Feb 10 19:03:11 2016 -0800 Remove cpp-empty-test from project templates. commit e070fcbf210b8628f75785e738202a80a95ac0ff Author: WenhaiLin <wenhai.lin@chukong-inc.com> Date: Mon Aug 31 09:56:03 2015 +0800 Fix CMake for Android Target
2016-03-03 08:51:54 +08:00
endif()
#leave andatory external stuff here also
include_directories(
../external/ConvertUTF
../external/edtaa3func
../external/poly2tri
../external/poly2tri/common
../external/poly2tri/sweep
)
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
../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
${COCOS_PLATFORM_SPECIFIC_SRC}
)