2014-03-11 17:56:33 +08:00
|
|
|
set(APP_NAME cpp-tests)
|
2013-11-02 18:07:34 +08:00
|
|
|
|
2014-01-09 17:48:37 +08:00
|
|
|
if(WIN32)
|
|
|
|
set(PLATFORM_SRC
|
|
|
|
proj.win32/main.cpp
|
|
|
|
)
|
2014-09-10 03:18:31 +08:00
|
|
|
elseif(MACOSX)
|
|
|
|
set(PLATFORM_SRC
|
|
|
|
proj.mac/main.cpp
|
|
|
|
)
|
|
|
|
elseif(LINUX)
|
2014-01-09 17:48:37 +08:00
|
|
|
set(PLATFORM_SRC
|
|
|
|
proj.linux/main.cpp
|
|
|
|
)
|
2014-09-10 03:18:31 +08:00
|
|
|
else()
|
|
|
|
message( FATAL_ERROR "Unsupported platform, CMake will exit" )
|
2014-01-09 17:48:37 +08:00
|
|
|
endif()
|
|
|
|
|
2014-09-10 03:18:31 +08:00
|
|
|
set(TESTS_SRC
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/ActionManagerTest/ActionManagerTest.cpp
|
|
|
|
Classes/ActionsEaseTest/ActionsEaseTest.cpp
|
|
|
|
Classes/ActionsProgressTest/ActionsProgressTest.cpp
|
|
|
|
Classes/ActionsTest/ActionsTest.cpp
|
2014-09-04 16:45:42 +08:00
|
|
|
Classes/BillBoardTest/BillBoardTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/Box2DTest/Box2dTest.cpp
|
|
|
|
Classes/Box2DTestBed/Box2dView.cpp
|
|
|
|
Classes/Box2DTestBed/GLES-Render.cpp
|
|
|
|
Classes/Box2DTestBed/Test.cpp
|
|
|
|
Classes/Box2DTestBed/TestEntries.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/BugsTest.cpp
|
2014-05-13 18:51:02 +08:00
|
|
|
Classes/BugsTest/Bug-Child.cpp
|
2014-08-07 15:23:31 +08:00
|
|
|
Classes/Camera3DTest/Camera3DTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/ChipmunkTest/ChipmunkTest.cpp
|
|
|
|
Classes/ClickAndMoveTest/ClickAndMoveTest.cpp
|
|
|
|
Classes/ClippingNodeTest/ClippingNodeTest.cpp
|
|
|
|
Classes/CocosDenshionTest/CocosDenshionTest.cpp
|
|
|
|
Classes/CurlTest/CurlTest.cpp
|
|
|
|
Classes/CurrentLanguageTest/CurrentLanguageTest.cpp
|
|
|
|
Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp
|
|
|
|
Classes/EffectsAdvancedTest/EffectsAdvancedTest.cpp
|
|
|
|
Classes/EffectsTest/EffectsTest.cpp
|
2014-10-09 18:30:39 +08:00
|
|
|
Classes/ExtensionsTest/AssetsManagerExTest/AssetsManagerExTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.cpp
|
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.cpp
|
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp
|
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/AnimationsTest/AnimationsTestLayer.cpp
|
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.cpp
|
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.cpp
|
|
|
|
Classes/ExtensionsTest/CocosBuilderTest/TimelineCallbackTest/TimelineCallbackTestLayer.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlScene.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlSceneManager.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.cpp
|
|
|
|
Classes/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.cpp
|
|
|
|
Classes/ExtensionsTest/TableViewTest/TableViewTestScene.cpp
|
|
|
|
Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp
|
|
|
|
Classes/ExtensionsTest/ExtensionsTest.cpp
|
|
|
|
Classes/ExtensionsTest/NotificationCenterTest/NotificationCenterTest.cpp
|
|
|
|
Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp
|
2014-06-16 09:40:27 +08:00
|
|
|
Classes/ExtensionsTest/CocoStudioActionTimelineTest/ActionTimelineTestScene.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/ExtensionsTest/CocoStudioComponentsTest/ComponentsTestScene.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioComponentsTest/EnemyController.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioComponentsTest/GameOverScene.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioComponentsTest/PlayerController.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioComponentsTest/ProjectileController.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioComponentsTest/SceneController.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp
|
2013-12-26 12:55:52 +08:00
|
|
|
Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/acts.cpp
|
|
|
|
Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp
|
2014-05-08 15:20:24 +08:00
|
|
|
Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScene.cpp
|
2014-07-29 15:25:50 +08:00
|
|
|
Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp
|
2014-05-08 15:20:24 +08:00
|
|
|
Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
|
2014-07-11 14:17:57 +08:00
|
|
|
Classes/UITest/CocoStudioGUITest/CocostudioParserTest/CocostudioParserJsonTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocostudioParserTest.cpp
|
2014-05-08 15:20:24 +08:00
|
|
|
Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.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/UIScrollViewTest/UIScrollViewTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp
|
2013-12-17 14:50:40 +08:00
|
|
|
Classes/NewRendererTest/NewRendererTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp
|
2014-09-30 01:07:11 +08:00
|
|
|
Classes/NewAudioEngineTest/NewAudioEngineTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/FontTest/FontTest.cpp
|
|
|
|
Classes/IntervalTest/IntervalTest.cpp
|
|
|
|
Classes/InputTest/MouseTest.cpp
|
|
|
|
Classes/LabelTest/LabelTest.cpp
|
|
|
|
Classes/LabelTest/LabelTestNew.cpp
|
|
|
|
Classes/LayerTest/LayerTest.cpp
|
2014-09-26 16:54:01 +08:00
|
|
|
Classes/LightTest/LightTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/MenuTest/MenuTest.cpp
|
|
|
|
Classes/MotionStreakTest/MotionStreakTest.cpp
|
|
|
|
Classes/MutiTouchTest/MutiTouchTest.cpp
|
|
|
|
Classes/NodeTest/NodeTest.cpp
|
2014-09-22 21:32:20 +08:00
|
|
|
Classes/OpenURLTest/OpenURLTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/ParallaxTest/ParallaxTest.cpp
|
|
|
|
Classes/ParticleTest/ParticleTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceAllocTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceParticleTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceSpriteTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceTextureTest.cpp
|
|
|
|
Classes/PerformanceTest/PerformanceTouchesTest.cpp
|
2013-12-13 12:42:15 +08:00
|
|
|
Classes/PerformanceTest/PerformanceLabelTest.cpp
|
2014-01-15 11:27:57 +08:00
|
|
|
Classes/PerformanceTest/PerformanceRendererTest.cpp
|
2014-01-17 09:44:49 +08:00
|
|
|
Classes/PerformanceTest/PerformanceContainerTest.cpp
|
2014-01-22 13:35:52 +08:00
|
|
|
Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp
|
2014-02-10 11:42:15 +08:00
|
|
|
Classes/PerformanceTest/PerformanceScenarioTest.cpp
|
2014-04-16 10:35:58 +08:00
|
|
|
Classes/PerformanceTest/PerformanceCallbackTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/PhysicsTest/PhysicsTest.cpp
|
2014-01-21 17:47:59 +08:00
|
|
|
Classes/ReleasePoolTest/ReleasePoolTest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/RenderTextureTest/RenderTextureTest.cpp
|
|
|
|
Classes/RotateWorldTest/RotateWorldTest.cpp
|
|
|
|
Classes/SceneTest/SceneTest.cpp
|
|
|
|
Classes/SchedulerTest/SchedulerTest.cpp
|
|
|
|
Classes/ShaderTest/ShaderTest.cpp
|
|
|
|
Classes/ShaderTest/ShaderTest2.cpp
|
|
|
|
Classes/SpriteTest/SpriteTest.cpp
|
2014-05-19 05:49:16 +08:00
|
|
|
Classes/Sprite3DTest/Sprite3DTest.cpp
|
2014-08-09 09:27:48 +08:00
|
|
|
Classes/Sprite3DTest/DrawNode3D.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/TextInputTest/TextInputTest.cpp
|
|
|
|
Classes/Texture2dTest/Texture2dTest.cpp
|
|
|
|
Classes/TexturePackerEncryptionTest/TextureAtlasEncryptionTest.cpp
|
|
|
|
Classes/TextureCacheTest/TextureCacheTest.cpp
|
|
|
|
Classes/TileMapTest/TileMapTest.cpp
|
2014-06-13 11:07:21 +08:00
|
|
|
Classes/TileMapTest/TileMapTest2.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/TouchesTest/Ball.cpp
|
|
|
|
Classes/TouchesTest/Paddle.cpp
|
|
|
|
Classes/TouchesTest/TouchesTest.cpp
|
|
|
|
Classes/TransitionsTest/TransitionsTest.cpp
|
|
|
|
Classes/UserDefaultTest/UserDefaultTest.cpp
|
|
|
|
Classes/ZwoptexTest/ZwoptexTest.cpp
|
|
|
|
Classes/FileUtilsTest/FileUtilsTest.cpp
|
|
|
|
Classes/SpineTest/SpineTest.cpp
|
|
|
|
Classes/DataVisitorTest/DataVisitorTest.cpp
|
|
|
|
Classes/ConfigurationTest/ConfigurationTest.cpp
|
2013-12-05 10:19:51 +08:00
|
|
|
Classes/ConsoleTest/ConsoleTest.cpp
|
2014-04-09 13:29:40 +08:00
|
|
|
Classes/UnitTest/RefPtrTest.cpp
|
2014-01-03 20:21:04 +08:00
|
|
|
Classes/UnitTest/UnitTest.cpp
|
2014-05-08 15:20:24 +08:00
|
|
|
Classes/UITest/UITest.cpp
|
2013-11-02 18:07:34 +08:00
|
|
|
Classes/controller.cpp
|
|
|
|
Classes/testBasic.cpp
|
|
|
|
Classes/AppDelegate.cpp
|
|
|
|
Classes/BaseTest.cpp
|
|
|
|
Classes/VisibleRect.cpp
|
2014-01-09 17:48:37 +08:00
|
|
|
${PLATFORM_SRC}
|
2013-11-02 18:07:34 +08:00
|
|
|
)
|
|
|
|
|
2014-09-10 03:18:31 +08:00
|
|
|
if(LINUX)
|
|
|
|
set(EXTENDED_TESTS_SRC
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set(EXTENDED_TESTS_SRC
|
|
|
|
Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp
|
|
|
|
Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp
|
|
|
|
Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp
|
|
|
|
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CocostudioParserTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScene.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp
|
|
|
|
Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2013-11-02 18:07:34 +08:00
|
|
|
include_directories(
|
|
|
|
Classes
|
2014-08-25 10:12:36 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/external/chipmunk/include/chipmunk
|
|
|
|
${CMAKE_SOURCE_DIR}/cocos/editor-support
|
2013-11-02 18:07:34 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# add the executable
|
2013-11-04 18:48:36 +08:00
|
|
|
add_executable(${APP_NAME}
|
2014-09-10 03:18:31 +08:00
|
|
|
${TESTS_SRC}
|
|
|
|
${EXTENDED_TESTS_SRC}
|
2013-11-02 18:07:34 +08:00
|
|
|
)
|
|
|
|
|
2013-11-04 18:48:36 +08:00
|
|
|
target_link_libraries(${APP_NAME}
|
2013-11-04 13:10:04 +08:00
|
|
|
cocos2d
|
2013-11-02 18:07:34 +08:00
|
|
|
)
|
|
|
|
|
2014-01-07 15:44:36 +08:00
|
|
|
set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${APP_NAME}")
|
2013-11-02 18:07:34 +08:00
|
|
|
|
2013-11-04 18:48:36 +08:00
|
|
|
set_target_properties(${APP_NAME} PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${APP_BIN_DIR}")
|
2013-11-02 18:07:34 +08:00
|
|
|
|
2013-11-06 10:55:39 +08:00
|
|
|
pre_build(${APP_NAME}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
|
|
|
|
)
|