2021-04-22 22:01:47 +08:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2019-11-23 20:27:39 +08:00
|
|
|
|
2022-05-23 21:55:30 +08:00
|
|
|
set(APP_NAME cpp_tests)
|
2019-11-23 20:27:39 +08:00
|
|
|
|
2022-05-13 21:06:17 +08:00
|
|
|
|
|
|
|
# "too large PDB" error often occurs in cpp-tests when using default "/Zi"
|
|
|
|
if (MSVC)
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
|
|
|
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
|
|
|
endif()
|
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
project(${APP_NAME})
|
|
|
|
|
|
|
|
if(NOT DEFINED BUILD_ENGINE_DONE)
|
2021-08-10 11:43:16 +08:00
|
|
|
if(XCODE)
|
|
|
|
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE)
|
|
|
|
endif()
|
|
|
|
|
2022-07-08 07:10:35 +08:00
|
|
|
set(AXIS_ROOT "$ENV{AXIS_ROOT}")
|
|
|
|
if(NOT (AXIS_ROOT STREQUAL ""))
|
|
|
|
set(AXIS_ROOT_PATH "${AXIS_ROOT}")
|
|
|
|
file(TO_CMAKE_PATH ${AXIS_ROOT_PATH} AXIS_ROOT_PATH) # string(REPLACE "\\" "/" AXIS_ROOT_PATH ${AXIS_ROOT_PATH})
|
|
|
|
message(STATUS "Using system env var AXIS_ROOT=${AXIS_ROOT}")
|
2020-10-18 01:05:36 +08:00
|
|
|
else()
|
2022-07-08 07:10:35 +08:00
|
|
|
set(AXIS_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
2020-10-18 01:01:36 +08:00
|
|
|
endif()
|
|
|
|
|
2022-07-08 07:10:35 +08:00
|
|
|
set(CMAKE_MODULE_PATH ${AXIS_ROOT_PATH}/cmake/Modules/)
|
2019-11-23 20:27:39 +08:00
|
|
|
|
2022-07-08 14:20:41 +08:00
|
|
|
include(AxisBuildSet)
|
2022-07-08 07:10:35 +08:00
|
|
|
add_subdirectory(${AXIS_ROOT_PATH}/core ${ENGINE_BINARY_PATH}/axis/core)
|
2019-11-23 20:27:39 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# record sources, headers, resources...
|
|
|
|
set(GAME_SOURCE)
|
|
|
|
set(GAME_HEADER)
|
|
|
|
|
|
|
|
set(GAME_RES_FOLDER
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Resources"
|
|
|
|
)
|
|
|
|
if(APPLE OR VS)
|
|
|
|
cocos_mark_multi_resources(cc_common_res RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ANDROID)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/JNITest/JNITest.h
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/JNITest/JNITest.cpp
|
|
|
|
proj.android/app/jni/main.cpp
|
|
|
|
)
|
|
|
|
elseif(LINUX)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
proj.linux/main.cpp
|
|
|
|
)
|
|
|
|
elseif(WINDOWS)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
proj.win32/main.h
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
proj.win32/main.cpp
|
|
|
|
${cc_common_res}
|
|
|
|
)
|
|
|
|
elseif(APPLE)
|
|
|
|
if(IOS)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
proj.ios/Classes/testsAppDelegate.h
|
|
|
|
proj.ios/Classes/RootViewController.h
|
|
|
|
)
|
|
|
|
set(APP_UI_RES
|
|
|
|
proj.ios/LaunchScreen.storyboard
|
|
|
|
proj.ios/LaunchScreenBackground.png
|
|
|
|
proj.ios/Images.xcassets
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
proj.ios/main.m
|
|
|
|
proj.ios/Classes/testsAppDelegate.mm
|
|
|
|
proj.ios/Classes/RootViewController.mm
|
|
|
|
proj.ios/Prefix.pch
|
|
|
|
${APP_UI_RES}
|
|
|
|
)
|
|
|
|
elseif(MACOSX)
|
|
|
|
set(APP_UI_RES
|
|
|
|
proj.mac/Icon.icns
|
|
|
|
proj.mac/Info.plist
|
|
|
|
proj.mac/Prefix.pch
|
|
|
|
proj.mac/en.lproj/InfoPlist.strings
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
proj.mac/main.cpp
|
|
|
|
${APP_UI_RES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
list(APPEND GAME_SOURCE ${cc_common_res})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/ActionsEaseTest/ActionsEaseTest.h
|
|
|
|
Classes/ParallaxTest/ParallaxTest.h
|
|
|
|
Classes/testBasic.h
|
|
|
|
Classes/ZwoptexTest/ZwoptexTest.h
|
|
|
|
Classes/precheader.h
|
|
|
|
Classes/CurlTest/CurlTest.h
|
|
|
|
Classes/UnitTest/UnitTest.h
|
|
|
|
# Classes/UnitTest/RefPtrTest.h
|
|
|
|
Classes/ConfigurationTest/ConfigurationTest.h
|
|
|
|
Classes/CurrentLanguageTest/CurrentLanguageTest.h
|
|
|
|
Classes/AppDelegate.h
|
|
|
|
Classes/LabelTest/LabelTestNew.h
|
|
|
|
# Classes/LabelTest/LabelTest.h
|
|
|
|
Classes/Particle3DTest/Particle3DTest.h
|
|
|
|
Classes/VibrateTest/VibrateTest.h
|
|
|
|
Classes/ClippingNodeTest/ClippingNodeTest.h
|
|
|
|
Classes/UserDefaultTest/UserDefaultTest.h
|
2022-02-25 19:03:09 +08:00
|
|
|
Classes/ImGuiTest/ImGuiTest.h
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/tests.h
|
|
|
|
Classes/DataVisitorTest/DataVisitorTest.h
|
|
|
|
Classes/NewAudioEngineTest/NewAudioEngineTest.h
|
|
|
|
Classes/BugsTest/Bug-422.h
|
|
|
|
Classes/BugsTest/Bug-CCDrawNode.h
|
|
|
|
Classes/BugsTest/BugsTest.h
|
|
|
|
Classes/BugsTest/Bug-12847.h
|
|
|
|
Classes/BugsTest/Bug-899.h
|
|
|
|
Classes/BugsTest/Bug-1159.h
|
|
|
|
Classes/BugsTest/Bug-350.h
|
|
|
|
Classes/BugsTest/Bug-15594.h
|
|
|
|
Classes/BugsTest/Bug-914.h
|
|
|
|
Classes/BugsTest/Bug-624.h
|
|
|
|
Classes/BugsTest/Bug-458/QuestionContainerSprite.h
|
|
|
|
Classes/BugsTest/Bug-458/Bug-458.h
|
|
|
|
Classes/BugsTest/Bug-886.h
|
|
|
|
Classes/BugsTest/Bug-Child.h
|
|
|
|
Classes/BugsTest/Bug-15776.h
|
|
|
|
Classes/BugsTest/Bug-1174.h
|
|
|
|
Classes/ActionsTest/ActionsTest.h
|
|
|
|
Classes/TouchesTest/TouchesTest.h
|
|
|
|
Classes/TouchesTest/Ball.h
|
|
|
|
Classes/TouchesTest/Paddle.h
|
|
|
|
Classes/ActionManagerTest/ActionManagerTest.h
|
|
|
|
Classes/ClickAndMoveTest/ClickAndMoveTest.h
|
|
|
|
Classes/MaterialSystemTest/MaterialSystemTest.h
|
|
|
|
Classes/IntervalTest/IntervalTest.h
|
|
|
|
Classes/TileMapTest/TileMapTest2.h
|
2020-08-28 15:42:40 +08:00
|
|
|
# Classes/TileMapTest/TileMapTest.h
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/NewEventDispatcherTest/NewEventDispatcherTest.h
|
|
|
|
Classes/ActionsProgressTest/ActionsProgressTest.h
|
|
|
|
Classes/RotateWorldTest/RotateWorldTest.h
|
|
|
|
Classes/Camera3DTest/Camera3DTest.h
|
|
|
|
Classes/TextInputTest/TextInputTest.h
|
|
|
|
Classes/Texture2dTest/Texture2dTest.h
|
|
|
|
Classes/TerrainTest/TerrainTest.h
|
|
|
|
Classes/controller.h
|
|
|
|
Classes/TransitionsTest/TransitionsTest.h
|
|
|
|
Classes/TextureCacheTest/TextureCacheTest.h
|
|
|
|
Classes/MotionStreakTest/MotionStreakTest.h
|
|
|
|
Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.h
|
|
|
|
Classes/ExtensionsTest/ExtensionsTest.h
|
|
|
|
Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h
|
|
|
|
Classes/ExtensionsTest/TableViewTest/TableViewTestScene.h
|
2022-07-05 14:48:46 +08:00
|
|
|
Classes/MeshRendererTest/MeshRendererTest.h
|
|
|
|
Classes/MeshRendererTest/DrawNode3D.h
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/BaseTest.h
|
|
|
|
Classes/SceneTest/SceneTest.h
|
|
|
|
Classes/ReleasePoolTest/ReleasePoolTest.h
|
|
|
|
Classes/InputTest/MouseTest.h
|
2020-01-05 03:09:32 +08:00
|
|
|
Classes/SpineTest/SpineTest.h
|
|
|
|
# Classes/Scene3DTest/Scene3DTest.h
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/ParticleTest/ParticleTest.h
|
|
|
|
Classes/EffectsTest/EffectsTest.h
|
|
|
|
Classes/UITest/UITest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocosGUIScene.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITabControlTest/UITabControlTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIEditBoxTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScene.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISceneManager.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIRadioButtonTest/UIRadioButtonTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.h
|
|
|
|
Classes/DrawPrimitivesTest/DrawPrimitivesTest.h
|
|
|
|
Classes/BillBoardTest/BillBoardTest.h
|
|
|
|
Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.h
|
|
|
|
Classes/EffectsAdvancedTest/EffectsAdvancedTest.h
|
|
|
|
Classes/SchedulerTest/SchedulerTest.h
|
|
|
|
Classes/MultiTouchTest/MultiTouchTest.h
|
|
|
|
Classes/testResource.h
|
|
|
|
Classes/ShaderTest/ShaderTest.vsh.h
|
|
|
|
Classes/ShaderTest/shaderTest.psh.h
|
|
|
|
Classes/ShaderTest/ShaderTest.h
|
|
|
|
Classes/ShaderTest/ShaderTest2.h
|
|
|
|
Classes/NewRendererTest/NewRendererTest.h
|
|
|
|
Classes/SpritePolygonTest/SpritePolygonTest.h
|
|
|
|
Classes/TexturePackerEncryptionTest/TextureAtlasEncryptionTest.h
|
|
|
|
Classes/NodeTest/NodeTest.h
|
|
|
|
Classes/FileUtilsTest/FileUtilsTest.h
|
|
|
|
Classes/RenderTextureTest/RenderTextureTest.h
|
|
|
|
Classes/LayerTest/LayerTest.h
|
|
|
|
Classes/SpriteTest/SpriteTest.h
|
|
|
|
Classes/FontTest/FontTest.h
|
|
|
|
Classes/LightTest/LightTest.h
|
|
|
|
Classes/VisibleRect.h
|
2021-07-04 16:40:34 +08:00
|
|
|
Classes/NetworkTest/NetworkTest.h
|
|
|
|
Classes/NetworkTest/DownloaderTest/DownloaderTest.h
|
|
|
|
Classes/NetworkTest/HttpClientTest/HttpClientTest.h
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/OpenURLTest/OpenURLTest.h
|
|
|
|
Classes/ConsoleTest/ConsoleTest.h
|
|
|
|
Classes/MenuTest/MenuTest.h
|
|
|
|
Classes/ZipTest/ZipTests.h
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/ActionManagerTest/ActionManagerTest.cpp
|
|
|
|
Classes/ActionsEaseTest/ActionsEaseTest.cpp
|
|
|
|
Classes/ActionsProgressTest/ActionsProgressTest.cpp
|
|
|
|
Classes/ActionsTest/ActionsTest.cpp
|
|
|
|
Classes/AppDelegate.cpp
|
|
|
|
Classes/BaseTest.cpp
|
|
|
|
Classes/BillBoardTest/BillBoardTest.cpp
|
|
|
|
Classes/BugsTest/Bug-CCDrawNode.cpp
|
|
|
|
Classes/BugsTest/Bug-1159.cpp
|
|
|
|
Classes/BugsTest/Bug-1174.cpp
|
|
|
|
Classes/BugsTest/Bug-350.cpp
|
|
|
|
Classes/BugsTest/Bug-422.cpp
|
|
|
|
Classes/BugsTest/Bug-458/Bug-458.cpp
|
|
|
|
Classes/BugsTest/Bug-458/QuestionContainerSprite.cpp
|
|
|
|
Classes/BugsTest/Bug-624.cpp
|
|
|
|
Classes/BugsTest/Bug-886.cpp
|
|
|
|
Classes/BugsTest/Bug-899.cpp
|
|
|
|
Classes/BugsTest/Bug-914.cpp
|
|
|
|
Classes/BugsTest/Bug-12847.cpp
|
|
|
|
Classes/BugsTest/Bug-15594.cpp
|
|
|
|
Classes/BugsTest/Bug-15776.cpp
|
|
|
|
Classes/BugsTest/Bug-Child.cpp
|
|
|
|
Classes/BugsTest/BugsTest.cpp
|
|
|
|
Classes/Camera3DTest/Camera3DTest.cpp
|
|
|
|
Classes/ClickAndMoveTest/ClickAndMoveTest.cpp
|
|
|
|
Classes/ClippingNodeTest/ClippingNodeTest.cpp
|
|
|
|
Classes/ConfigurationTest/ConfigurationTest.cpp
|
|
|
|
Classes/ConsoleTest/ConsoleTest.cpp
|
|
|
|
Classes/CurlTest/CurlTest.cpp
|
|
|
|
Classes/CurrentLanguageTest/CurrentLanguageTest.cpp
|
|
|
|
Classes/DataVisitorTest/DataVisitorTest.cpp
|
2021-07-04 16:40:34 +08:00
|
|
|
Classes/NetworkTest/NetworkTest.cpp
|
|
|
|
Classes/NetworkTest/DownloaderTest/DownloaderTest.cpp
|
|
|
|
Classes/NetworkTest/HttpClientTest/HttpClientTest.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp
|
|
|
|
Classes/EffectsAdvancedTest/EffectsAdvancedTest.cpp
|
|
|
|
Classes/EffectsTest/EffectsTest.cpp
|
|
|
|
Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp
|
|
|
|
Classes/ExtensionsTest/ExtensionsTest.cpp
|
|
|
|
Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp
|
|
|
|
Classes/ExtensionsTest/TableViewTest/TableViewTestScene.cpp
|
|
|
|
Classes/FileUtilsTest/FileUtilsTest.cpp
|
|
|
|
Classes/FontTest/FontTest.cpp
|
|
|
|
Classes/InputTest/MouseTest.cpp
|
|
|
|
Classes/IntervalTest/IntervalTest.cpp
|
|
|
|
# Classes/LabelTest/LabelTest.cpp
|
|
|
|
Classes/LabelTest/LabelTestNew.cpp
|
|
|
|
Classes/LayerTest/LayerTest.cpp
|
|
|
|
Classes/LightTest/LightTest.cpp
|
|
|
|
Classes/MaterialSystemTest/MaterialSystemTest.cpp
|
|
|
|
Classes/MenuTest/MenuTest.cpp
|
|
|
|
Classes/MotionStreakTest/MotionStreakTest.cpp
|
|
|
|
Classes/MultiTouchTest/MultiTouchTest.cpp
|
|
|
|
Classes/NewAudioEngineTest/NewAudioEngineTest.cpp
|
|
|
|
Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp
|
|
|
|
Classes/NewRendererTest/NewRendererTest.cpp
|
|
|
|
Classes/NodeTest/NodeTest.cpp
|
|
|
|
Classes/OpenURLTest/OpenURLTest.cpp
|
|
|
|
Classes/ParallaxTest/ParallaxTest.cpp
|
|
|
|
Classes/Particle3DTest/Particle3DTest.cpp
|
|
|
|
Classes/ParticleTest/ParticleTest.cpp
|
|
|
|
Classes/ReleasePoolTest/ReleasePoolTest.cpp
|
|
|
|
Classes/RenderTextureTest/RenderTextureTest.cpp
|
|
|
|
Classes/RotateWorldTest/RotateWorldTest.cpp
|
|
|
|
Classes/SceneTest/SceneTest.cpp
|
|
|
|
Classes/SchedulerTest/SchedulerTest.cpp
|
|
|
|
Classes/ShaderTest/ShaderTest.cpp
|
|
|
|
Classes/ShaderTest/ShaderTest2.cpp
|
2020-01-05 03:09:32 +08:00
|
|
|
Classes/SpineTest/SpineTest.cpp
|
|
|
|
# Classes/Scene3DTest/Scene3DTest.cpp
|
2022-07-05 14:48:46 +08:00
|
|
|
Classes/MeshRendererTest/DrawNode3D.cpp
|
|
|
|
Classes/MeshRendererTest/MeshRendererTest.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/SpritePolygonTest/SpritePolygonTest.cpp
|
|
|
|
Classes/SpriteTest/SpriteTest.cpp
|
|
|
|
Classes/TerrainTest/TerrainTest.cpp
|
|
|
|
Classes/TextInputTest/TextInputTest.cpp
|
|
|
|
Classes/Texture2dTest/Texture2dTest.cpp
|
|
|
|
Classes/TextureCacheTest/TextureCacheTest.cpp
|
|
|
|
Classes/TexturePackerEncryptionTest/TextureAtlasEncryptionTest.cpp
|
2020-08-28 15:42:40 +08:00
|
|
|
#Classes/TileMapTest/TileMapTest.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/TileMapTest/TileMapTest2.cpp
|
|
|
|
Classes/TouchesTest/Ball.cpp
|
|
|
|
Classes/TouchesTest/Paddle.cpp
|
|
|
|
Classes/TouchesTest/TouchesTest.cpp
|
|
|
|
Classes/TransitionsTest/TransitionsTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIRadioButtonTest/UIRadioButtonTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITabControlTest/UITabControlTest.cpp
|
|
|
|
Classes/UITest/UITest.cpp
|
|
|
|
# Classes/UnitTest/RefPtrTest.cpp
|
|
|
|
Classes/UnitTest/UnitTest.cpp
|
|
|
|
Classes/UserDefaultTest/UserDefaultTest.cpp
|
2022-02-25 19:03:09 +08:00
|
|
|
Classes/ImGuiTest/ImGuiTest.cpp
|
2019-11-23 20:27:39 +08:00
|
|
|
Classes/VisibleRect.cpp
|
|
|
|
Classes/VibrateTest/VibrateTest.cpp
|
|
|
|
Classes/ZwoptexTest/ZwoptexTest.cpp
|
|
|
|
Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp
|
|
|
|
Classes/controller.cpp
|
|
|
|
Classes/ZipTest/ZipTests.cpp
|
|
|
|
)
|
|
|
|
|
2022-02-24 19:00:49 +08:00
|
|
|
if(ANDROID OR IOS OR WIN32)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.h)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp)
|
|
|
|
endif()
|
2022-02-24 18:30:58 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
if(ANDROID OR IOS)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WINDOWS OR MACOSX OR LINUX)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/WindowTest/WindowTest.h
|
|
|
|
Classes/BugsTest/Bug-14327.h
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/WindowTest/WindowTest.cpp
|
|
|
|
Classes/BugsTest/Bug-14327.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-10-04 15:55:01 +08:00
|
|
|
if(WINDOWS)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-11-20 13:38:09 +08:00
|
|
|
list(APPEND GAME_HEADER
|
2021-07-06 21:02:47 +08:00
|
|
|
Classes/Box2DTest/Box2dTest.h
|
|
|
|
)
|
|
|
|
|
2021-07-07 02:29:38 +08:00
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/Box2DTest/Box2dTest.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WINDOWS OR MACOSX OR LINUX)
|
2021-07-06 21:02:47 +08:00
|
|
|
list(APPEND GAME_HEADER
|
2021-08-12 15:34:24 +08:00
|
|
|
Classes/Box2DTestBed/tests/test.h
|
|
|
|
Classes/Box2DTestBed/tests/settings.h
|
2021-07-06 21:02:47 +08:00
|
|
|
Classes/Box2DTestBed/Box2DTestBed.h
|
2020-11-20 13:38:09 +08:00
|
|
|
)
|
2020-11-20 13:19:30 +08:00
|
|
|
|
2021-07-07 02:29:38 +08:00
|
|
|
list(APPEND GAME_SOURCE
|
2021-08-05 17:23:55 +08:00
|
|
|
Classes/Box2DTestBed/Box2DTestBed.cpp
|
|
|
|
Classes/Box2DTestBed/test.cpp
|
2021-07-06 21:02:47 +08:00
|
|
|
Classes/Box2DTestBed/tests/add_pair.cpp
|
|
|
|
Classes/Box2DTestBed/tests/apply_force.cpp
|
|
|
|
Classes/Box2DTestBed/tests/body_types.cpp
|
|
|
|
Classes/Box2DTestBed/tests/box_stack.cpp
|
|
|
|
Classes/Box2DTestBed/tests/breakable.cpp
|
|
|
|
Classes/Box2DTestBed/tests/bridge.cpp
|
|
|
|
Classes/Box2DTestBed/tests/bullet_test.cpp
|
|
|
|
Classes/Box2DTestBed/tests/cantilever.cpp
|
|
|
|
Classes/Box2DTestBed/tests/car.cpp
|
|
|
|
Classes/Box2DTestBed/tests/chain.cpp
|
|
|
|
Classes/Box2DTestBed/tests/chain_problem.cpp
|
|
|
|
Classes/Box2DTestBed/tests/character_collision.cpp
|
|
|
|
Classes/Box2DTestBed/tests/circle_stack.cpp
|
|
|
|
Classes/Box2DTestBed/tests/collision_filtering.cpp
|
|
|
|
Classes/Box2DTestBed/tests/collision_processing.cpp
|
|
|
|
Classes/Box2DTestBed/tests/compound_shapes.cpp
|
|
|
|
Classes/Box2DTestBed/tests/confined.cpp
|
|
|
|
Classes/Box2DTestBed/tests/continuous_test.cpp
|
|
|
|
Classes/Box2DTestBed/tests/convex_hull.cpp
|
|
|
|
Classes/Box2DTestBed/tests/conveyor_belt.cpp
|
|
|
|
Classes/Box2DTestBed/tests/distance_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/distance_test.cpp
|
|
|
|
Classes/Box2DTestBed/tests/dominos.cpp
|
|
|
|
Classes/Box2DTestBed/tests/dump_loader.cpp
|
|
|
|
Classes/Box2DTestBed/tests/dynamic_tree.cpp
|
|
|
|
Classes/Box2DTestBed/tests/edge_shapes.cpp
|
|
|
|
Classes/Box2DTestBed/tests/edge_test.cpp
|
|
|
|
Classes/Box2DTestBed/tests/friction.cpp
|
|
|
|
Classes/Box2DTestBed/tests/gear_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/heavy1.cpp
|
|
|
|
Classes/Box2DTestBed/tests/heavy2.cpp
|
|
|
|
Classes/Box2DTestBed/tests/mobile_balanced.cpp
|
|
|
|
Classes/Box2DTestBed/tests/mobile_unbalanced.cpp
|
|
|
|
Classes/Box2DTestBed/tests/motor_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/pinball.cpp
|
|
|
|
Classes/Box2DTestBed/tests/platformer.cpp
|
|
|
|
Classes/Box2DTestBed/tests/polygon_collision.cpp
|
|
|
|
Classes/Box2DTestBed/tests/polygon_shapes.cpp
|
|
|
|
Classes/Box2DTestBed/tests/prismatic_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/pulley_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/pyramid.cpp
|
|
|
|
Classes/Box2DTestBed/tests/ray_cast.cpp
|
|
|
|
Classes/Box2DTestBed/tests/restitution.cpp
|
|
|
|
Classes/Box2DTestBed/tests/revolute_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/rope.cpp
|
|
|
|
Classes/Box2DTestBed/tests/sensor.cpp
|
|
|
|
Classes/Box2DTestBed/tests/shape_cast.cpp
|
|
|
|
Classes/Box2DTestBed/tests/shape_editing.cpp
|
|
|
|
Classes/Box2DTestBed/tests/skier.cpp
|
|
|
|
Classes/Box2DTestBed/tests/slider_crank_1.cpp
|
|
|
|
Classes/Box2DTestBed/tests/slider_crank_2.cpp
|
|
|
|
Classes/Box2DTestBed/tests/theo_jansen.cpp
|
|
|
|
Classes/Box2DTestBed/tests/tiles.cpp
|
|
|
|
Classes/Box2DTestBed/tests/time_of_impact.cpp
|
|
|
|
Classes/Box2DTestBed/tests/tumbler.cpp
|
|
|
|
Classes/Box2DTestBed/tests/web.cpp
|
|
|
|
Classes/Box2DTestBed/tests/wheel_joint.cpp
|
|
|
|
Classes/Box2DTestBed/tests/wrecking_ball.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2021-07-07 02:29:38 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/Physics3DTest/Physics3DTest.h
|
|
|
|
Classes/NavMeshTest/NavMeshTest.h
|
|
|
|
)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/Physics3DTest/Physics3DTest.cpp
|
|
|
|
Classes/NavMeshTest/NavMeshTest.cpp
|
|
|
|
)
|
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/PhysicsTest/PhysicsTest.h
|
|
|
|
Classes/ChipmunkTest/ChipmunkTest.h
|
2021-06-17 14:22:52 +08:00
|
|
|
)
|
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/PhysicsTest/PhysicsTest.cpp
|
|
|
|
Classes/ChipmunkTest/ChipmunkTest.cpp
|
2021-06-17 14:22:52 +08:00
|
|
|
)
|
2021-07-07 02:29:38 +08:00
|
|
|
|
2021-07-06 20:46:56 +08:00
|
|
|
if(WINDOWS OR MACOSX OR LINUX)
|
2021-07-07 02:29:38 +08:00
|
|
|
list(APPEND GAME_HEADER
|
|
|
|
Classes/ChipmunkTestBed/demo/ChipmunkDemo.h
|
|
|
|
Classes/ChipmunkTestBed/ChipmunkTestBed.h
|
|
|
|
)
|
2021-06-17 14:22:52 +08:00
|
|
|
set (TESTBED_C_SORUCES
|
2021-07-06 20:46:56 +08:00
|
|
|
Classes/ChipmunkTestBed/demo/Bench.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Chains.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Convex.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Crane.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Joints.c
|
|
|
|
Classes/ChipmunkTestBed/demo/LogoSmash.c
|
|
|
|
Classes/ChipmunkTestBed/demo/OneWay.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Planet.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Player.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Plink.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Pump.c
|
|
|
|
Classes/ChipmunkTestBed/demo/PyramidStack.c
|
|
|
|
Classes/ChipmunkTestBed/demo/PyramidTopple.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Shatter.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Springies.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Sticky.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Tank.c
|
|
|
|
Classes/ChipmunkTestBed/demo/TheoJansen.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Buoyancy.c
|
|
|
|
Classes/ChipmunkTestBed/demo/ContactGraph.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Example.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Query.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Slice.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Unicycle.c
|
|
|
|
Classes/ChipmunkTestBed/demo/Tumble.c)
|
2022-05-13 21:06:17 +08:00
|
|
|
if(WINDOWS)
|
|
|
|
set_source_files_properties(${TESTBED_C_SORUCES} PROPERTIES COMPILE_FLAGS "/TP")
|
|
|
|
else()
|
|
|
|
set_source_files_properties(${TESTBED_C_SORUCES} PROPERTIES LANGUAGE CXX)
|
|
|
|
endif()
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
${TESTBED_C_SORUCES}
|
|
|
|
Classes/ChipmunkTestBed/ChipmunkTestBed.cpp
|
|
|
|
)
|
2021-06-17 14:22:52 +08:00
|
|
|
endif()
|
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
if(NOT LINUX)
|
|
|
|
list(APPEND GAME_SOURCE
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# mark app complie info and libs info
|
|
|
|
set(all_code_files
|
|
|
|
${GAME_HEADER}
|
|
|
|
${GAME_SOURCE}
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT ANDROID)
|
|
|
|
add_executable(${APP_NAME} ${all_code_files})
|
|
|
|
else()
|
|
|
|
add_library(${APP_NAME} SHARED ${all_code_files})
|
2022-01-04 09:40:27 +08:00
|
|
|
|
|
|
|
# whole archive for jni
|
2022-07-08 07:10:35 +08:00
|
|
|
add_subdirectory(${AXIS_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
2022-01-04 09:40:27 +08:00
|
|
|
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
|
|
|
|
2020-10-19 19:19:17 +08:00
|
|
|
config_android_shared_libs("org.cocos2dx.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
2019-11-23 20:27:39 +08:00
|
|
|
endif()
|
|
|
|
|
2022-07-08 07:10:35 +08:00
|
|
|
target_link_libraries(${APP_NAME} ${AXIS_CORE_LIB})
|
2022-01-04 09:40:27 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
target_include_directories(${APP_NAME}
|
|
|
|
PRIVATE Classes
|
|
|
|
)
|
|
|
|
|
2021-09-05 20:45:32 +08:00
|
|
|
if(WIN64)
|
|
|
|
target_link_options(${APP_NAME} PRIVATE "/STACK:4194304")
|
|
|
|
endif()
|
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
# mark app resources
|
|
|
|
setup_cocos_app_config(${APP_NAME})
|
|
|
|
if(APPLE)
|
|
|
|
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
|
2020-01-06 09:36:58 +08:00
|
|
|
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
|
2022-07-08 07:10:35 +08:00
|
|
|
set_xcode_property(${APP_NAME} PRODUCT_BUNDLE_IDENTIFIER "org.axis.cpp_tests")
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
if(MACOSX)
|
2019-12-10 13:41:44 +08:00
|
|
|
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.mac/Info.plist")
|
2019-11-23 20:27:39 +08:00
|
|
|
elseif(IOS)
|
2019-12-10 13:41:44 +08:00
|
|
|
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
|
2022-05-23 23:40:37 +08:00
|
|
|
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
2019-11-23 20:27:39 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# For code-signing, set the DEVELOPMENT_TEAM:
|
|
|
|
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
|
|
|
|
elseif(WINDOWS)
|
|
|
|
cocos_copy_target_dll(${APP_NAME})
|
|
|
|
endif()
|
|
|
|
|
2022-04-26 15:16:02 +08:00
|
|
|
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
|
2019-11-23 20:27:39 +08:00
|
|
|
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
|
|
|
|
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
|
2022-04-26 15:16:02 +08:00
|
|
|
elseif(WINDOWS)
|
|
|
|
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${GAME_RES_FOLDER}")
|
2019-11-23 20:27:39 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WINDOWS)
|
2022-04-27 18:51:54 +08:00
|
|
|
# precompiled header. Compilation time speedup ~4x, but don't know how Ninja to support PCH yet and needs help from someone.
|
|
|
|
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
|
|
|
|
target_sources(${APP_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Classes/precheader.cpp")
|
|
|
|
set_target_properties(${APP_NAME} PROPERTIES COMPILE_FLAGS "/Yuprecheader.h /FIprecheader.h")
|
|
|
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/Classes/precheader.cpp" PROPERTIES COMPILE_FLAGS "/Ycprecheader.h")
|
|
|
|
endif()
|
2019-12-02 18:17:42 +08:00
|
|
|
endif()
|