forked from Xrysnow/lstgx_Math
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
71 lines (64 loc) · 1.58 KB
/
CMakeLists.txt
File metadata and controls
71 lines (64 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
set(LIB_NAME x_math)
set(INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}
${COCOS2DX_ROOT_PATH}/cocos
${COCOS2DX_ROOT_PATH}/cocos/base
${COCOS2DX_ROOT_PATH}/cocos/platform
${COCOS2DX_ROOT_PATH}/extensions
${COCOS2DX_ROOT_PATH}/external
${COCOS2DX_ROOT_PATH}/external/glfw3/include/win32
${COCOS2DX_ROOT_PATH}/external/glfw/include/GLFW
${COCOS2DX_ROOT_PATH}/external/win32-specific/gles/include/OGLES
)
if(BUILD_LUA_LIBS)
list(APPEND INCLUDES
${COCOS2DX_ROOT_PATH}/external/lua/luajit/include
${COCOS2DX_ROOT_PATH}/external/lua/tolua)
endif()
foreach(dir ${INCLUDES})
if(EXISTS ${dir})
include_directories(${dir})
endif()
endforeach()
set(HEADER
meow_fft.h
XCollision.h
XComplex.h
XConstant.h
XDistance.h
XEquation.h
XFFT.h
XIntersect.h
XMath.h
XRandom.h
XSpline.h
XTween.h
)
set(SOURCE
meow_fft.c
XCollision.cpp
XComplex.cpp
XDistance.cpp
XEquation.cpp
XFFT.cpp
XIntersect.cpp
XRandom.cpp
XSpline.cpp
XTween.cpp
)
add_library(${LIB_NAME} STATIC ${SOURCE} ${HEADER})
add_dependencies(${LIB_NAME} cocos2d)
use_cocos2dx_compile_define(${LIB_NAME})
use_cocos2dx_compile_options(${LIB_NAME})
if(BUILD_LUA_LIBS)
target_compile_definitions(${LIB_NAME} PUBLIC _USRLUASTATIC)
endif()
set_target_properties(${LIB_NAME}
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}
)
if(XCODE OR VS)
cocos_mark_code_files(${LIB_NAME})
endif()