This commit is contained in:
Huabing.Xu 2014-04-25 15:10:37 +08:00
Родитель 589646343d
Коммит 613ba6e5b6
4 изменённых файлов: 27 добавлений и 9 удалений

Просмотреть файл

@ -141,10 +141,10 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/renderer
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform
${CMAKE_CURRENT_SOURCE_DIR}/cocos/base
${CMAKE_CURRENT_SOURCE_DIR}/cocos/math
${CMAKE_CURRENT_SOURCE_DIR}/cocos/deprecated
${CMAKE_CURRENT_SOURCE_DIR}/cocos/physics
${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support
${CMAKE_CURRENT_SOURCE_DIR}/cocos/math/kazmath
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/auto
${CMAKE_CURRENT_SOURCE_DIR}/cocos/scripting/lua-bindings/manual
${CMAKE_CURRENT_SOURCE_DIR}/extensions
@ -217,10 +217,6 @@ else()
endif()
# kazmath
add_subdirectory(cocos/math/kazmath)
# chipmunk library
add_subdirectory(external/chipmunk/src)
@ -242,6 +238,9 @@ add_subdirectory(cocos/audio)
# cocos base library
add_subdirectory(cocos/base)
# cocos math library
add_subdirectory(cocos/math)
# cocos 2d library
add_subdirectory(cocos/2d)
@ -302,8 +301,7 @@ if(BUILD_CppTests)
add_subdirectory(tests/cpp-tests)
endif(BUILD_CppTests)
add_subdirectory(tests/lua-empty-test/project)
if(BUILD_LuaTests)
add_subdirectory(tests/lua-tests/project)
add_subdirectory(tests/lua-empty-test/project)
endif(BUILD_LuaTests)

Просмотреть файл

@ -135,7 +135,6 @@ set(COCOS2D_SRC
platform/CCFileUtils.cpp
platform/CCImage.cpp
renderer/CCCustomCommand.cpp
renderer/CCFrustum.cpp
renderer/CCGroupCommand.cpp
renderer/CCMaterialManager.cpp
renderer/CCQuadCommand.cpp
@ -214,9 +213,9 @@ endif()
target_link_libraries(cocos2d
cocosbase
cocosmath
chipmunk_static
tinyxml2
kazmath
unzip
xxhash
${COCOS_LINK}

Просмотреть файл

@ -2,6 +2,7 @@
#define __CCMATHBASE_H__
#include <memory>
#include <string.h>
#define MATH_DEG_TO_RAD(x) ((x) * 0.0174532925f)
#define MATH_RAD_TO_DEG(x) ((x)* 57.29577951f)

20
cocos/math/CMakeLists.txt Normal file
Просмотреть файл

@ -0,0 +1,20 @@
set(COCOS_MATH_SRC
MathUtil.cpp
Matrix.cpp
Quaternion.cpp
Vector2.cpp
Vector3.cpp
Vector4.cpp
)
add_library(cocosmath STATIC
${COCOS_MATH_SRC}
)
set_target_properties(cocosmath
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)