Migrate cmake files

This commit is contained in:
halx99 2022-08-11 15:41:10 +08:00
parent 5b8cb6995c
commit b1287b8cc5
35 changed files with 307 additions and 307 deletions

View File

@ -1,13 +1,13 @@
include(CMakeParseArguments)
# copy resource `FILES` and `FOLDERS` to TARGET_FILE_DIR/Resources
function(cocos_copy_target_res cocos_target)
function(ax_copy_target_res ax_target)
set(oneValueArgs LINK_TO)
set(multiValueArgs FOLDERS)
cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT TARGET SYNC_RESOURCE-${cocos_target})
message(WARNING "SyncResource targe for ${cocos_target} is not defined")
if(NOT TARGET SYNC_RESOURCE-${ax_target})
message(WARNING "SyncResource targe for ${ax_target} is not defined")
return()
endif()
@ -15,7 +15,7 @@ function(cocos_copy_target_res cocos_target)
foreach(cc_folder ${opt_FOLDERS})
#get_filename_component(link_folder ${opt_LINK_TO} DIRECTORY)
get_filename_component(link_folder_abs ${opt_LINK_TO} ABSOLUTE)
add_custom_command(TARGET SYNC_RESOURCE-${cocos_target} POST_BUILD
add_custom_command(TARGET SYNC_RESOURCE-${ax_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo " copying to ${link_folder_abs}"
COMMAND ${PYTHON_COMMAND} ARGS ${AXYS_ROOT_PATH}/cmake/scripts/sync_folder.py
-s ${cc_folder} -d ${link_folder_abs}
@ -23,26 +23,26 @@ function(cocos_copy_target_res cocos_target)
endforeach()
endfunction()
## create a virtual target SYNC_RESOURCE-${cocos_target}
## create a virtual target SYNC_RESOURCE-${ax_target}
## Update resource files in Resources/ folder everytime when `Run/Debug` target.
function(cocos_def_copy_resource_target cocos_target)
add_custom_target(SYNC_RESOURCE-${cocos_target} ALL
COMMAND ${CMAKE_COMMAND} -E echo "Copying resources for ${cocos_target} ..."
function(ax_def_copy_resource_target ax_target)
add_custom_target(SYNC_RESOURCE-${ax_target} ALL
COMMAND ${CMAKE_COMMAND} -E echo "Copying resources for ${ax_target} ..."
)
add_dependencies(${cocos_target} SYNC_RESOURCE-${cocos_target})
set_target_properties(SYNC_RESOURCE-${cocos_target} PROPERTIES
add_dependencies(${ax_target} SYNC_RESOURCE-${ax_target})
set_target_properties(SYNC_RESOURCE-${ax_target} PROPERTIES
FOLDER Utils
)
endfunction()
function(cocos_copy_lua_scripts cocos_target src_dir dst_dir)
set(luacompile_target COPY_LUA-${cocos_target})
function(ax_copy_lua_scripts ax_target src_dir dst_dir)
set(luacompile_target COPY_LUA-${ax_target})
if(NOT TARGET ${luacompile_target})
add_custom_target(${luacompile_target} ALL
COMMAND ${CMAKE_COMMAND} -E echo "Copying lua scripts ..."
)
add_dependencies(${cocos_target} ${luacompile_target})
add_dependencies(${ax_target} ${luacompile_target})
set_target_properties(${luacompile_target} PROPERTIES
FOLDER Utils
)
@ -69,15 +69,15 @@ function(cocos_copy_lua_scripts cocos_target src_dir dst_dir)
endfunction()
function(cocos_get_resource_path output cocos_target)
get_target_property(rt_output ${cocos_target} RUNTIME_OUTPUT_DIRECTORY)
function(ax_get_resource_path output ax_target)
get_target_property(rt_output ${ax_target} RUNTIME_OUTPUT_DIRECTORY)
set(${output} "${rt_output}/${CMAKE_CFG_INTDIR}/Resources" PARENT_SCOPE)
endfunction()
# mark `FILES` and files in `FOLDERS` as resource files, the destination is `RES_TO` folder
# save all marked files in `res_out`
function(cocos_mark_multi_resources res_out)
function(ax_mark_multi_resources res_out)
set(oneValueArgs RES_TO)
set(multiValueArgs FILES FOLDERS)
cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@ -86,22 +86,22 @@ function(cocos_mark_multi_resources res_out)
foreach(cc_file ${opt_FILES})
get_filename_component(cc_file_abs ${cc_file} ABSOLUTE)
get_filename_component(file_dir ${cc_file_abs} DIRECTORY)
cocos_mark_resources(FILES ${cc_file_abs} BASEDIR ${file_dir} RESOURCEBASE ${opt_RES_TO})
ax_mark_resources(FILES ${cc_file_abs} BASEDIR ${file_dir} RESOURCEBASE ${opt_RES_TO})
endforeach()
list(APPEND tmp_file_list ${opt_FILES})
foreach(cc_folder ${opt_FOLDERS})
file(GLOB_RECURSE folder_files "${cc_folder}/*")
list(APPEND tmp_file_list ${folder_files})
cocos_mark_resources(FILES ${folder_files} BASEDIR ${cc_folder} RESOURCEBASE ${opt_RES_TO})
ax_mark_resources(FILES ${folder_files} BASEDIR ${cc_folder} RESOURCEBASE ${opt_RES_TO})
endforeach()
set(${res_out} ${tmp_file_list} PARENT_SCOPE)
endfunction()
# get all linked libraries including transitive ones, recursive
function(search_depend_libs_recursive cocos_target all_depends_out)
function(search_depend_libs_recursive ax_target all_depends_out)
set(all_depends_inner)
set(targets_prepare_search ${cocos_target})
set(targets_prepare_search ${ax_target})
while(true)
foreach(tmp_target ${targets_prepare_search})
get_target_property(target_type ${tmp_target} TYPE)
@ -130,12 +130,12 @@ function(search_depend_libs_recursive cocos_target all_depends_out)
set(${all_depends_out} ${all_depends_inner} PARENT_SCOPE)
endfunction()
# get `cocos_target` depend all dlls, save the result in `all_depend_dlls_out`
function(get_target_depends_ext_dlls cocos_target all_depend_dlls_out)
# get `ax_target` depend all dlls, save the result in `all_depend_dlls_out`
function(get_target_depends_ext_dlls ax_target all_depend_dlls_out)
set(depend_libs)
set(all_depend_ext_dlls)
search_depend_libs_recursive(${cocos_target} depend_libs)
search_depend_libs_recursive(${ax_target} depend_libs)
foreach(depend_lib ${depend_libs})
if(TARGET ${depend_lib})
get_target_property(target_type ${depend_lib} TYPE)
@ -152,7 +152,7 @@ function(get_target_depends_ext_dlls cocos_target all_depend_dlls_out)
set(${all_depend_dlls_out} ${all_depend_ext_dlls} PARENT_SCOPE)
endfunction()
function(copy_thirdparty_dlls cocos_target destDir)
function(copy_thirdparty_dlls ax_target destDir)
# init dependency list with direct dependencies
get_property(DEPENDENCIES TARGET ${_AX_THIRDPARTY_NAME} PROPERTY LINK_LIBRARIES)
# We're not intersted in interface link libraries of the top-most target
@ -188,70 +188,70 @@ function(copy_thirdparty_dlls cocos_target destDir)
endforeach()
message(STATUS "EXT_LIB_FILES=${EXT_LIB_FILES}")
add_custom_command(TARGET ${cocos_target}
add_custom_command(TARGET ${ax_target}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${EXT_LIB_FILES}
${destDir} # ${CMAKE_BINARY_DIR}/lib/$<CONFIG>
)
endfunction()
# copy the `cocos_target` needed dlls into TARGET_FILE_DIR
function(cocos_copy_target_dll cocos_target)
get_target_depends_ext_dlls(${cocos_target} all_depend_dlls)
# copy the `ax_target` needed dlls into TARGET_FILE_DIR
function(ax_copy_target_dll ax_target)
get_target_depends_ext_dlls(${ax_target} all_depend_dlls)
# remove repeat items
if(all_depend_dlls)
list(REMOVE_DUPLICATES all_depend_dlls)
endif()
foreach(cc_dll_file ${all_depend_dlls})
get_filename_component(cc_dll_name ${cc_dll_file} NAME)
add_custom_command(TARGET ${cocos_target} POST_BUILD
add_custom_command(TARGET ${ax_target} POST_BUILD
#COMMAND ${CMAKE_COMMAND} -E echo "copy dll into target file dir: ${cc_dll_name} ..."
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${cc_dll_file} "$<TARGET_FILE_DIR:${cocos_target}>/${cc_dll_name}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${cc_dll_file} "$<TARGET_FILE_DIR:${ax_target}>/${cc_dll_name}"
)
endforeach()
# copy thirdparty dlls to target bin dir
# copy_thirdparty_dlls(${cocos_target} $<TARGET_FILE_DIR:${cocos_target}>)
# copy_thirdparty_dlls(${ax_target} $<TARGET_FILE_DIR:${ax_target}>)
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
set(THIRD_PARTY_ARCH "\$\(Configuration\)/")
endif()
add_custom_command(TARGET ${cocos_target} POST_BUILD
add_custom_command(TARGET ${ax_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/bin/${THIRD_PARTY_ARCH}OpenAL32.dll"
$<TARGET_FILE_DIR:${cocos_target}>)
$<TARGET_FILE_DIR:${ax_target}>)
# Copy windows angle binaries
add_custom_command(TARGET ${cocos_target} POST_BUILD
add_custom_command(TARGET ${ax_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${AXYS_ROOT_PATH}/${_AX_THIRDPARTY_NAME}/angle/prebuilt/${ARCH_ALIAS}/libGLESv2.dll
${AXYS_ROOT_PATH}/${_AX_THIRDPARTY_NAME}/angle/prebuilt/${ARCH_ALIAS}/libEGL.dll
${AXYS_ROOT_PATH}/${_AX_THIRDPARTY_NAME}/angle/prebuilt/${ARCH_ALIAS}/d3dcompiler_47.dll
$<TARGET_FILE_DIR:${cocos_target}>
$<TARGET_FILE_DIR:${ax_target}>
)
# Copy webview2 for ninja
if(CMAKE_GENERATOR STREQUAL "Ninja")
add_custom_command(TARGET ${cocos_target} POST_BUILD
add_custom_command(TARGET ${ax_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/packages/Microsoft.Web.WebView2/build/native/${ARCH_ALIAS}/WebView2Loader.dll"
$<TARGET_FILE_DIR:${cocos_target}>)
$<TARGET_FILE_DIR:${ax_target}>)
endif()
endfunction()
function(cocos_copy_lua_dlls cocos_target)
function(ax_copy_lua_dlls ax_target)
if(NOT AX_USE_LUAJIT)
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
set(THIRD_PARTY_ARCH "\$\(Configuration\)/")
endif()
add_custom_command(TARGET ${cocos_target} POST_BUILD
add_custom_command(TARGET ${ax_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/bin/${THIRD_PARTY_ARCH}plainlua.dll"
$<TARGET_FILE_DIR:${cocos_target}>)
$<TARGET_FILE_DIR:${ax_target}>)
endif()
endfunction()
# mark `FILES` as resources, files will be put into sub-dir tree depend on its absolute path
function(cocos_mark_resources)
function(ax_mark_resources)
set(oneValueArgs BASEDIR RESOURCEBASE)
set(multiValueArgs FILES)
cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@ -277,20 +277,20 @@ function(cocos_mark_resources)
endforeach()
endfunction()
# mark the code sources of `cocos_target` into sub-dir tree
function(cocos_mark_code_files cocos_target)
# mark the code sources of `ax_target` into sub-dir tree
function(ax_mark_code_files ax_target)
set(oneValueArgs GROUPBASE)
cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT opt_GROUPBASE)
set(root_dir ${CMAKE_CURRENT_SOURCE_DIR})
else()
set(root_dir ${opt_GROUPBASE})
message(STATUS "target ${cocos_target} code group base is: ${root_dir}")
message(STATUS "target ${ax_target} code group base is: ${root_dir}")
endif()
# message(STATUS "cocos_mark_code_files: ${cocos_target}")
# message(STATUS "ax_mark_code_files: ${ax_target}")
get_property(file_list TARGET ${cocos_target} PROPERTY SOURCES)
get_property(file_list TARGET ${ax_target} PROPERTY SOURCES)
foreach(single_file ${file_list})
source_group_single_file(${single_file} GROUP_TO "Source Files" BASE_PATH "${root_dir}")
@ -312,8 +312,8 @@ function(source_group_single_file single_file)
source_group("${ide_file_group}" FILES ${single_file})
endfunction()
# setup a cocos application
function(setup_cocos_app_config app_name)
# setup a axys application
function(setup_ax_app_config app_name)
# put all output app into bin/${app_name}
set_target_properties(${app_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/${app_name}")
if(APPLE)
@ -334,15 +334,15 @@ function(setup_cocos_app_config app_name)
endif()
# auto mark code files for IDE when mark app
if(XCODE OR VS)
cocos_mark_code_files(${app_name})
ax_mark_code_files(${app_name})
endif()
if (XCODE)
cocos_config_app_xcode_property(${app_name})
ax_config_app_xcode_property(${app_name})
endif()
if(LINUX OR WINDOWS)
cocos_def_copy_resource_target(${app_name})
ax_def_copy_resource_target(${app_name})
endif()
if(BUILD_SHARED_LIBS)
@ -365,30 +365,30 @@ function(setup_cocos_app_config app_name)
endfunction()
# if cc_variable not set, then set it cc_value
macro(cocos_set_default_value cc_variable cc_value)
macro(ax_set_default_value cc_variable cc_value)
if(NOT DEFINED ${cc_variable})
set(${cc_variable} ${cc_value})
endif()
endmacro()
# set Xcode property for application, include all depend target
macro(cocos_config_app_xcode_property cocos_app)
macro(ax_config_app_xcode_property ax_app)
set(depend_libs)
search_depend_libs_recursive(${cocos_app} depend_libs)
search_depend_libs_recursive(${ax_app} depend_libs)
foreach(depend_lib ${depend_libs})
if(TARGET ${depend_lib})
cocos_config_target_xcode_property(${depend_lib})
ax_config_target_xcode_property(${depend_lib})
endif()
endforeach()
endmacro()
# custom Xcode property for iOS target
macro(cocos_config_target_xcode_property cocos_target)
macro(ax_config_target_xcode_property ax_target)
if(IOS)
set(real_target)
get_property(real_target TARGET ${cocos_target} PROPERTY ALIASED_TARGET)
get_property(real_target TARGET ${ax_target} PROPERTY ALIASED_TARGET)
if (NOT real_target)
set(real_target ${cocos_target})
set(real_target ${ax_target})
endif()
set_xcode_property(${real_target} ENABLE_BITCODE "NO")
set_xcode_property(${real_target} ONLY_ACTIVE_ARCH "YES")
@ -401,7 +401,7 @@ function(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
endfunction(set_xcode_property)
# works same as find_package, but do additional care to properly find
macro(cocos_find_package pkg_name pkg_prefix)
macro(ax_find_package pkg_name pkg_prefix)
if(NOT ${pkg_prefix}_FOUND)
find_package(${pkg_name} ${ARGN})
endif()
@ -415,11 +415,11 @@ macro(cocos_find_package pkg_name pkg_prefix)
message(STATUS "${pkg_name} include dirs: ${${pkg_prefix}_INCLUDE_DIRS}")
endmacro()
# cocos_use_pkg(pkg) function.
# ax_use_pkg(pkg) function.
# This function applies standard package variables (after find_package(pkg) call) to current scope
# Recognized variables: <pkg>_INCLUDE_DIRS, <pkg>_LIBRARIES, <pkg>_LIBRARY_DIRS
# Also if BUILD_SHARED_LIBS variable off, it is try to use <pkg>_STATIC_* vars before
function(cocos_use_pkg target pkg)
function(ax_use_pkg target pkg)
set(prefix ${pkg})
set(_include_dirs)
@ -488,7 +488,7 @@ function(cocos_use_pkg target pkg)
endfunction()
# The axis preprocessors config helper macro
macro(axis_config_pred target_name pred)
macro(ax_config_pred target_name pred)
if(${pred})
target_compile_definitions(${target_name} PUBLIC ${pred}=1)
endif()

View File

@ -7,7 +7,7 @@ set(CMAKE_DEBUG_TARGET_PROPERTIES
# POSITION_INDEPENDENT_CODE
)
# some useful variables for every one cocos project
# some useful variables for every one axys project
set(ENGINE_BINARY_PATH ${PROJECT_BINARY_DIR}/engine)
if(CMAKE_TOOLCHAIN_FILE)
@ -15,7 +15,7 @@ if(CMAKE_TOOLCHAIN_FILE)
endif()
find_program(PYTHON_COMMAND NAMES python3 python2 python)
find_program(COCOS_COMMAND NAME axis
find_program(_AX_COMMAND NAME axis
PATHS ${AXYS_ROOT_PATH}/tools/axis-console/bin $ENV{AXYS_CONSOLE_ROOT})
message(STATUS "PROJECT_NAME:" ${PROJECT_NAME})
@ -26,7 +26,7 @@ message(STATUS "CMAKE_MODULE_PATH:" ${CMAKE_MODULE_PATH})
message(STATUS "PROJECT_BINARY_DIR:" ${PROJECT_BINARY_DIR})
message(STATUS "ENGINE_BINARY_PATH:" ${ENGINE_BINARY_PATH})
message(STATUS "PYTHON_PATH:" ${PYTHON_COMMAND})
message(STATUS "COCOS_COMMAND_PATH:" ${COCOS_COMMAND})
message(STATUS "_AX_COMMAND_PATH:" ${_AX_COMMAND})
message(STATUS "HOST_SYSTEM:" ${CMAKE_HOST_SYSTEM_NAME})
# the default behavior of build module
option(AX_ENABLE_EXT_LUA "Build lua libraries" OFF)
@ -45,9 +45,9 @@ include(AXConfigDefine)
# config libraries dependence
include(AXConfigDepend)
if(COCOS_COMMAND)
get_filename_component(axis_console_dir ${COCOS_COMMAND} DIRECTORY)
set(_AX_LUAJIT_ROOT ${axis_console_dir}/../plugins/plugin_luacompile/bin)
if(_AX_COMMAND)
get_filename_component(ax_console_dir ${_AX_COMMAND} DIRECTORY)
set(_AX_LUAJIT_ROOT ${ax_console_dir}/../plugins/plugin_luacompile/bin)
message(STATUS "_AX_LUAJIT_ROOT:" ${_AX_LUAJIT_ROOT})
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
find_program(LUAJIT32_COMMAND NAMES luajit-win32 PATHS ${_AX_LUAJIT_ROOT}/32bit NO_SYSTEM_ENVIRONMENT_PATH)

View File

@ -1,4 +1,4 @@
macro(axis_depend)
macro(ax_depend)
# confim the libs, prepare to link
set(PLATFORM_SPECIFIC_LIBS)
@ -10,14 +10,14 @@ macro(axis_depend)
# need review those libs: X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m
list(APPEND PLATFORM_SPECIFIC_LIBS dl X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m bsd)
# use older cmake style on below linux libs
cocos_find_package(Fontconfig FONTCONFIG REQUIRED)
cocos_find_package(GTK3 GTK3 REQUIRED)
# cocos_find_package(ZLIB ZLIB REQUIRED)
# cocos_find_package(PNG PNG REQUIRED)
# cocos_find_package(GLEW GLEW REQUIRED)
cocos_find_package(OpenGL OPENGL REQUIRED)
# cocos_find_package(CURL CURL REQUIRED)
# cocos_find_package(SQLite3 SQLITE3 REQUIRED)
ax_find_package(Fontconfig FONTCONFIG REQUIRED)
ax_find_package(GTK3 GTK3 REQUIRED)
# ax_find_package(ZLIB ZLIB REQUIRED)
# ax_find_package(PNG PNG REQUIRED)
# ax_find_package(GLEW GLEW REQUIRED)
ax_find_package(OpenGL OPENGL REQUIRED)
# ax_find_package(CURL CURL REQUIRED)
# ax_find_package(SQLite3 SQLITE3 REQUIRED)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
set(THREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
@ -31,7 +31,7 @@ macro(axis_depend)
find_library(QUARTZCORE_LIBRARY QuartzCore)
find_library(GAMECONTROLLER_LIBRARY GameController)
find_library(METAL_LIBRARY Metal)
set(COCOS_APPLE_LIBS
set(_AX_APPLE_LIBS
${AUDIOTOOLBOX_LIBRARY}
${QUARTZCORE_LIBRARY}
${FOUNDATION_LIBRARY}
@ -41,9 +41,9 @@ macro(axis_depend)
if(NOT AX_USE_ALSOFT)
find_library(OPENAL_LIBRARY OpenAL)
set(COCOS_APPLE_LIBS
set(_AX_APPLE_LIBS
${OPENAL_LIBRARY}
${COCOS_APPLE_LIBS}
${_AX_APPLE_LIBS}
)
endif()
@ -64,7 +64,7 @@ macro(axis_depend)
${OPENGL_LIBRARY}
${APPLICATIONSERVICES_LIBRARY}
${IOKIT_LIBRARY}
${COCOS_APPLE_LIBS}
${_AX_APPLE_LIBS}
${APPKIT_LIBRARY}
#${ICONV_LIBRARY}
${AUDIOUNIT_LIBRARY}
@ -96,7 +96,7 @@ macro(axis_depend)
${CORE_GRAPHICS_LIBRARY}
${AV_FOUNDATION_LIBRARY}
${WEBKIT_LIBRARY}
${COCOS_APPLE_LIBS}
${_AX_APPLE_LIBS}
${ZLIB}
#${ICONVLIB}
)
@ -105,21 +105,21 @@ macro(axis_depend)
endmacro()
macro(use_ax_depend target)
axis_depend()
ax_depend()
foreach(platform_lib ${PLATFORM_SPECIFIC_LIBS})
target_link_libraries(${target} ${platform_lib})
endforeach()
if(LINUX)
cocos_use_pkg(${target} FONTCONFIG)
cocos_use_pkg(${target} GTK3)
#cocos_use_pkg(${target} ZLIB)
#cocos_use_pkg(${target} PNG)
#cocos_use_pkg(${target} GLEW)
cocos_use_pkg(${target} OPENGL)
#cocos_use_pkg(${target} CURL)
cocos_use_pkg(${target} THREADS)
#cocos_use_pkg(${target} SQLITE3)
ax_use_pkg(${target} FONTCONFIG)
ax_use_pkg(${target} GTK3)
#ax_use_pkg(${target} ZLIB)
#ax_use_pkg(${target} PNG)
#ax_use_pkg(${target} GLEW)
ax_use_pkg(${target} OPENGL)
#ax_use_pkg(${target} CURL)
ax_use_pkg(${target} THREADS)
#ax_use_pkg(${target} SQLITE3)
endif()
endmacro()

View File

@ -14,7 +14,7 @@ endif()
message(STATUS "AX_ENABLE_MSEDGE_WEBVIEW2=${AX_ENABLE_MSEDGE_WEBVIEW2}")
function(axis_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
if (NOT AX_USE_SHARED_PREBUILT)
target_compile_definitions(${APP_NAME}
PRIVATE AX_STATIC=1
@ -82,38 +82,38 @@ function(axis_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
# Linking engine and thirdparty libs
target_link_libraries(${APP_NAME}
spine.lib
particle3d.lib
assets-manager.lib
cocostudio.lib
DragonBones.lib
axis.lib
box2d.lib
chipmunk.lib
freetype.lib
zlib.lib
recast.lib
bullet.lib
jpeg-static.lib
libcrypto.lib
libssl.lib
webp.lib
pugixml.lib
xxhash.lib
lz4.lib
clipper.lib
ConvertUTF.lib
poly2tri.lib
astc.lib
libcurl_imp.lib
OpenAL32.lib
ogg.lib
glad.lib
glfw.lib
png.lib
unzip.lib
llhttp.lib
physics-nodes.lib
spine
particle3d
assets-manager
cocostudio
DragonBones
axys
box2d
chipmunk
freetype
zlib
recast
bullet
jpeg-static
libcrypto
libssl
webp
pugixml
xxhash
lz4
clipper
ConvertUTF
poly2tri
astc
libcurl_imp
OpenAL32
ogg
glad
glfw
png
unzip
llhttp
physics-nodes
)
# Copy dlls to app bin dir
@ -147,7 +147,7 @@ function(axis_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
if(CMAKE_GENERATOR STREQUAL "Ninja")
target_link_libraries(${APP_NAME} ${AX_ROOT_DIR}/build/packages/Microsoft.Web.WebView2/build/native/${ARCH_ALIAS}/WebView2Loader.dll.lib)
target_include_directories(${APP_NAME} ${AX_ROOT_DIR}/build/packages/Microsoft.Web.WebView2/build/native/include)
add_custom_command(TARGET ${cocos_target} POST_BUILD
add_custom_command(TARGET ${ax_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${AX_ROOT_DIR}/build/packages/Microsoft.Web.WebView2/build/native/${ARCH_ALIAS}/WebView2Loader.dll"
$<TARGET_FILE_DIR:${APP_NAME}>
@ -156,10 +156,10 @@ function(axis_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
target_link_libraries(${APP_NAME} ${AX_ROOT_DIR}/build/packages/Microsoft.Web.WebView2/build/native/Microsoft.Web.WebView2.targets)
endif()
endif()
endfunction(axis_link_cxx_prebuilt)
endfunction(ax_link_cxx_prebuilt)
function(axis_link_lua_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
axis_link_cxx_prebuilt(${APP_NAME} ${AX_ROOT_DIR} ${AX_PREBUILT_DIR})
function(ax_link_lua_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
ax_link_cxx_prebuilt(${APP_NAME} ${AX_ROOT_DIR} ${AX_PREBUILT_DIR})
if (NOT AX_USE_SHARED_PREBUILT)
target_compile_definitions(${APP_NAME}
@ -171,4 +171,4 @@ function(axis_link_lua_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${AX_ROOT_DIR}/${AX_PREBUILT_DIR}/bin/${THIRD_PARTY_ARCH}plainlua.dll"
$<TARGET_FILE_DIR:${APP_NAME}>)
endfunction(axis_link_lua_prebuilt)
endfunction(ax_link_lua_prebuilt)

View File

@ -1,4 +1,4 @@
set(COCOS_2D_HEADER
set(_AX_2D_HEADER
2d/CCActionPageTurn3D.h
2d/CCActionTween.h
@ -70,7 +70,7 @@ set(COCOS_2D_HEADER
2d/CCPlistSpriteSheetLoader.h
)
set(COCOS_2D_SRC
set(_AX_2D_SRC
2d/CCActionCamera.cpp
2d/CCActionCatmullRom.cpp

View File

@ -1,4 +1,4 @@
set(COCOS_3D_HEADER
set(_AX_3D_HEADER
3d/CCBillBoard.h
3d/CCFrustum.h
@ -28,7 +28,7 @@ set(COCOS_3D_HEADER
3d/CC3DProgramInfo.h
)
set(COCOS_3D_SRC
set(_AX_3D_SRC
3d/CCAABB.cpp
3d/CCAnimate3D.cpp

View File

@ -80,39 +80,39 @@ include(ui/CMakeLists.txt)
include(network/CMakeLists.txt)
include(audio/CMakeLists.txt)
set(COCOS_HEADER axys.h
${COCOS_2D_HEADER}
${COCOS_3D_HEADER}
${COCOS_PLATFORM_HEADER}
${COCOS_PHYSICS_HEADER}
${COCOS_PHYSICS3D_HEADER}
${COCOS_MATH_HEADER}
${COCOS_NAVMESH_HEADER}
${COCOS_RENDERER_HEADER}
${COCOS_BASE_HEADER}
${COCOS_AUDIO_HEADER}
${COCOS_UI_HEADER}
${COCOS_NETWORK_HEADER}
set(_AX_HEADER axys.h
${_AX_2D_HEADER}
${_AX_3D_HEADER}
${_AX_PLATFORM_HEADER}
${_AX_PHYSICS_HEADER}
${_AX_PHYSICS3D_HEADER}
${_AX_MATH_HEADER}
${_AX_NAVMESH_HEADER}
${_AX_RENDERER_HEADER}
${_AX_BASE_HEADER}
${_AX_AUDIO_HEADER}
${_AX_UI_HEADER}
${_AX_NETWORK_HEADER}
)
set(COCOS_SRC axys.cpp
${COCOS_2D_SRC}
${COCOS_3D_SRC}
${COCOS_PLATFORM_SRC}
${COCOS_PHYSICS_SRC}
${COCOS_PHYSICS3D_SRC}
${COCOS_MATH_SRC}
${COCOS_NAVMESH_SRC}
${COCOS_RENDERER_SRC}
${COCOS_BASE_SRC}
${COCOS_AUDIO_SRC}
${COCOS_UI_SRC}
${COCOS_NETWORK_SRC}
set(_AX_SRC axys.cpp
${_AX_2D_SRC}
${_AX_3D_SRC}
${_AX_PLATFORM_SRC}
${_AX_PHYSICS_SRC}
${_AX_PHYSICS3D_SRC}
${_AX_MATH_SRC}
${_AX_NAVMESH_SRC}
${_AX_RENDERER_SRC}
${_AX_BASE_SRC}
${_AX_AUDIO_SRC}
${_AX_UI_SRC}
${_AX_NETWORK_SRC}
)
list(APPEND COCOS_SRC ${COCOS_HEADER})
list(APPEND _AX_SRC ${_AX_HEADER})
add_library(${_AX_CORE_LIB} ${COCOS_SRC})
add_library(${_AX_CORE_LIB} ${_AX_SRC})
# use thirdparty libs
add_subdirectory(${AXYS_ROOT_PATH}/thirdparty ${ENGINE_BINARY_PATH}/thirdparty)
@ -154,7 +154,7 @@ set_target_properties(${_AX_CORE_LIB}
# endif()
if(XCODE OR VS)
cocos_mark_code_files("${_AX_CORE_LIB}")
ax_mark_code_files("${_AX_CORE_LIB}")
endif()
if(WINDOWS)
@ -165,7 +165,7 @@ if(WINDOWS)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp" PROPERTIES COMPILE_FLAGS "/Ycprecheader.h")
endif()
# compile c as c++. needed for precompiled header
set_source_files_properties(${COCOS_SPINE_SRC} base/ccFPSImages.c PROPERTIES LANGUAGE CXX)
set_source_files_properties(${_AX_SPINE_SRC} base/ccFPSImages.c PROPERTIES LANGUAGE CXX)
if(AX_ENABLE_MSEDGE_WEBVIEW2)
find_program(NUGET_EXE NAMES nuget

View File

@ -1,6 +1,6 @@
# common headers and sources
set(COCOS_AUDIO_HEADER
set(_AX_AUDIO_HEADER
audio/alconfig.h
audio/AudioEngine.h
audio/AudioMacros.h
@ -12,7 +12,7 @@ set(COCOS_AUDIO_HEADER
audio/AudioEngineImpl.h
)
set(COCOS_AUDIO_SRC
set(_AX_AUDIO_SRC
audio/AudioEngine.cpp
audio/AudioDecoderManager.cpp
audio/AudioDecoder.cpp
@ -25,16 +25,16 @@ set(COCOS_AUDIO_SRC
if(APPLE)
set_source_files_properties(audio/AudioEngineImpl.cpp PROPERTIES LANGUAGE OBJCXX)
set(COCOS_AUDIO_HEADER ${COCOS_AUDIO_HEADER}
set(_AX_AUDIO_HEADER ${_AX_AUDIO_HEADER}
audio/AudioDecoderEXT.h)
set(COCOS_AUDIO_SRC ${COCOS_AUDIO_SRC}
set(_AX_AUDIO_SRC ${_AX_AUDIO_SRC}
audio/AudioDecoderEXT.mm)
else()
set(COCOS_AUDIO_HEADER ${COCOS_AUDIO_HEADER}
set(_AX_AUDIO_HEADER ${_AX_AUDIO_HEADER}
audio/AudioDecoderMp3.h
audio/AudioDecoderWav.h
)
set(COCOS_AUDIO_SRC ${COCOS_AUDIO_SRC}
set(_AX_AUDIO_SRC ${_AX_AUDIO_SRC}
audio/AudioDecoderMp3.cpp
audio/AudioDecoderWav.cpp
)

View File

@ -1,20 +1,20 @@
if(APPLE)
set(COCOS_BASE_SPECIFIC_SRC
set(_AX_BASE_SPECIFIC_SRC
base/CCController-apple.mm
)
elseif(ANDROID)
set(COCOS_BASE_SPECIFIC_SRC
set(_AX_BASE_SPECIFIC_SRC
base/CCController-android.cpp
)
elseif(LINUX OR WINDOWS)
set(COCOS_BASE_SPECIFIC_SRC
set(_AX_BASE_SPECIFIC_SRC
base/CCController-linux-win32.cpp
)
endif()
set(COCOS_BASE_HEADER
set(_AX_BASE_HEADER
base/astc.h
base/pvr.h
base/format.h
@ -82,7 +82,7 @@ set(COCOS_BASE_HEADER
base/CCIMEDispatcher.h
)
set(COCOS_BASE_SRC
set(_AX_BASE_SRC
base/CCAsyncTaskPool.cpp
base/CCAutoreleasePool.cpp
base/CCConfiguration.cpp
@ -136,5 +136,5 @@ set(COCOS_BASE_SRC
base/pvr.cpp
base/s3tc.cpp
base/astc.cpp
${COCOS_BASE_SPECIFIC_SRC}
${_AX_BASE_SPECIFIC_SRC}
)

View File

@ -1,4 +1,4 @@
set(COCOS_MATH_HEADER
set(_AX_MATH_HEADER
math/Vec2.h
math/Mat3.h
math/Mat4.h
@ -15,7 +15,7 @@ set(COCOS_MATH_HEADER
math/FastRNG.h
)
set(COCOS_MATH_SRC
set(_AX_MATH_SRC
math/CCAffineTransform.cpp
math/CCVertex.cpp
math/Mat3.cpp

View File

@ -1,4 +1,4 @@
set(COCOS_NAVMESH_HEADER
set(_AX_NAVMESH_HEADER
navmesh/CCNavMeshAgent.h
navmesh/CCNavMeshObstacle.h
navmesh/CCNavMeshUtils.h
@ -6,7 +6,7 @@ set(COCOS_NAVMESH_HEADER
navmesh/CCNavMesh.h
)
set(COCOS_NAVMESH_SRC
set(_AX_NAVMESH_SRC
navmesh/CCNavMesh.cpp
navmesh/CCNavMeshAgent.cpp
navmesh/CCNavMeshDebugDraw.cpp

View File

@ -1,4 +1,4 @@
set(COCOS_NETWORK_HEADER
set(_AX_NETWORK_HEADER
network/CCDownloader-curl.h
network/CCIDownloaderImpl.h
network/CCDownloader.h
@ -9,7 +9,7 @@ set(COCOS_NETWORK_HEADER
network/HttpCookie.h
)
set(COCOS_NETWORK_SRC
set(_AX_NETWORK_SRC
network/HttpClient.cpp
network/CCDownloader.cpp
network/CCDownloader-curl.cpp

View File

@ -1,4 +1,4 @@
set(COCOS_PHYSICS_HEADER
set(_AX_PHYSICS_HEADER
physics/CCPhysicsContact.h
physics/CCPhysicsWorld.h
physics/CCPhysicsBody.h
@ -8,7 +8,7 @@ set(COCOS_PHYSICS_HEADER
physics/CCPhysicsJoint.h
)
set(COCOS_PHYSICS_SRC
set(_AX_PHYSICS_SRC
physics/CCPhysicsBody.cpp
physics/CCPhysicsContact.cpp
physics/CCPhysicsJoint.cpp

View File

@ -1,4 +1,4 @@
set(COCOS_PHYSICS3D_HEADER
set(_AX_PHYSICS3D_HEADER
physics3d/CCPhysics3DConstraint.h
physics3d/CCPhysics3DShape.h
physics3d/CCPhysics3D.h
@ -9,7 +9,7 @@ set(COCOS_PHYSICS3D_HEADER
physics3d/CCPhysics3DDebugDrawer.h
)
set(COCOS_PHYSICS3D_SRC
set(_AX_PHYSICS3D_SRC
physics3d/CCPhysics3D.cpp
physics3d/CCPhysics3DComponent.cpp
physics3d/CCPhysics3DConstraint.cpp

View File

@ -24,7 +24,7 @@
if(ANDROID)
# refer to target: core/platform/android/CMakeLists.txt
set(COCOS_PLATFORM_SPECIFIC_SRC
set(_AX_PLATFORM_SPECIFIC_SRC
platform/android/CCApplication-android.cpp
platform/android/CCCommon-android.cpp
platform/android/CCGLViewImpl-android.cpp
@ -32,7 +32,7 @@ if(ANDROID)
platform/android/CCEnhanceAPI-android.cpp
)
elseif(WINDOWS)
set(COCOS_PLATFORM_SPECIFIC_HEADER
set(_AX_PLATFORM_SPECIFIC_HEADER
platform/win32/compat/stdint.h
platform/win32/CCApplication-win32.h
platform/win32/inet_pton_mingw.h
@ -42,7 +42,7 @@ elseif(WINDOWS)
platform/win32/CCPlatformDefine-win32.h
platform/desktop/CCGLViewImpl-desktop.h
)
set(COCOS_PLATFORM_SPECIFIC_SRC
set(_AX_PLATFORM_SPECIFIC_SRC
platform/win32/CCStdC-win32.cpp
platform/win32/CCFileUtils-win32.cpp
platform/win32/CCCommon-win32.cpp
@ -53,25 +53,25 @@ elseif(WINDOWS)
)
elseif(APPLE)
set(COCOS_PLATFORM_SPECIFIC_HEADER
set(_AX_PLATFORM_SPECIFIC_HEADER
platform/apple/CCFileUtils-apple.h
platform/apple/CCDevice-apple.h
)
set(COCOS_PLATFORM_SPECIFIC_SRC
set(_AX_PLATFORM_SPECIFIC_SRC
platform/apple/CCFileUtils-apple.mm
platform/apple/CCDevice-apple.mm
)
if(MACOSX)
set(COCOS_PLATFORM_SPECIFIC_HEADER
${COCOS_PLATFORM_SPECIFIC_HEADER}
set(_AX_PLATFORM_SPECIFIC_HEADER
${_AX_PLATFORM_SPECIFIC_HEADER}
platform/mac/CCStdC-mac.h
platform/mac/CCGLViewImpl-mac.h
platform/mac/CCPlatformDefine-mac.h
platform/mac/CCApplication-mac.h
# platform/desktop/CCGLViewImpl-desktop.h
)
set(COCOS_PLATFORM_SPECIFIC_SRC
${COCOS_PLATFORM_SPECIFIC_SRC}
set(_AX_PLATFORM_SPECIFIC_SRC
${_AX_PLATFORM_SPECIFIC_SRC}
platform/mac/CCApplication-mac.mm
platform/mac/CCGLViewImpl-mac.mm
platform/mac/CCCommon-mac.mm
@ -79,8 +79,8 @@ elseif(APPLE)
# platform/desktop/CCGLViewImpl-desktop.cpp
)
elseif(IOS)
set(COCOS_PLATFORM_SPECIFIC_HEADER
${COCOS_PLATFORM_SPECIFIC_HEADER}
set(_AX_PLATFORM_SPECIFIC_HEADER
${_AX_PLATFORM_SPECIFIC_HEADER}
platform/ios/CCApplication-ios.h
platform/ios/CCDirectorCaller-ios.h
platform/ios/CCEAGLView-ios.h
@ -89,8 +89,8 @@ elseif(APPLE)
platform/ios/CCStdC-ios.h
platform/ios/CCInputView-ios.h
)
set(COCOS_PLATFORM_SPECIFIC_SRC
${COCOS_PLATFORM_SPECIFIC_SRC}
set(_AX_PLATFORM_SPECIFIC_SRC
${_AX_PLATFORM_SPECIFIC_SRC}
platform/ios/CCApplication-ios.mm
platform/ios/CCCommon-ios.mm
platform/ios/CCDevice-ios.mm
@ -102,16 +102,16 @@ elseif(APPLE)
)
if(NOT AX_USE_COMPAT_GL)
set(COCOS_PLATFORM_SPECIFIC_HEADER
${COCOS_PLATFORM_SPECIFIC_HEADER}
set(_AX_PLATFORM_SPECIFIC_HEADER
${_AX_PLATFORM_SPECIFIC_HEADER}
platform/ios/CCES2Renderer-ios.h
platform/ios/CCES2Renderer-ios.h
platform/ios/CCESRenderer-ios.h
platform/ios/CCGL-ios.h
platform/ios/OpenGL_Internal-ios.h
)
set(COCOS_PLATFORM_SPECIFIC_SRC
${COCOS_PLATFORM_SPECIFIC_SRC}
set(_AX_PLATFORM_SPECIFIC_SRC
${_AX_PLATFORM_SPECIFIC_SRC}
platform/ios/CCES2Renderer-ios.m
)
endif()
@ -127,7 +127,7 @@ elseif(LINUX)
)
endif(NOT CMAKE_CROSSCOMPILING)
set(COCOS_PLATFORM_SPECIFIC_HEADER
set(_AX_PLATFORM_SPECIFIC_HEADER
platform/linux/CCApplication-linux.h
platform/linux/CCGL-linux.h
platform/linux/CCStdC-linux.h
@ -135,7 +135,7 @@ elseif(LINUX)
platform/linux/CCPlatformDefine-linux.h
platform/desktop/CCGLViewImpl-desktop.h
)
set(COCOS_PLATFORM_SPECIFIC_SRC
set(_AX_PLATFORM_SPECIFIC_SRC
platform/linux/CCFileUtils-linux.cpp
platform/linux/CCCommon-linux.cpp
platform/linux/CCApplication-linux.cpp
@ -144,8 +144,8 @@ elseif(LINUX)
)
endif()
set(COCOS_PLATFORM_HEADER
${COCOS_PLATFORM_SPECIFIC_HEADER}
set(_AX_PLATFORM_HEADER
${_AX_PLATFORM_SPECIFIC_HEADER}
platform/CCApplication.h
platform/CCApplicationProtocol.h
platform/CCCommon.h
@ -163,8 +163,8 @@ set(COCOS_PLATFORM_HEADER
platform/CCPosixFileStream.h
)
set(COCOS_PLATFORM_SRC
${COCOS_PLATFORM_SPECIFIC_SRC}
set(_AX_PLATFORM_SRC
${_AX_PLATFORM_SPECIFIC_SRC}
platform/CCSAXParser.cpp
platform/CCGLView.cpp
platform/CCFileUtils.cpp

View File

@ -1,4 +1,4 @@
set(COCOS_RENDERER_HEADER
set(_AX_RENDERER_HEADER
renderer/CCCallbackCommand.h
renderer/CCCustomCommand.h
renderer/CCGroupCommand.h
@ -41,7 +41,7 @@ set(COCOS_RENDERER_HEADER
renderer/backend/DeviceInfo.h
)
set(COCOS_RENDERER_SRC
set(_AX_RENDERER_SRC
renderer/CCCallbackCommand.cpp
renderer/CCCustomCommand.cpp
renderer/CCGroupCommand.cpp
@ -79,7 +79,7 @@ set(COCOS_RENDERER_SRC
if(ANDROID OR WINDOWS OR LINUX OR AX_USE_COMPAT_GL)
list(APPEND COCOS_RENDERER_HEADER
list(APPEND _AX_RENDERER_HEADER
renderer/backend/opengl/BufferGL.h
renderer/backend/opengl/CommandBufferGL.h
renderer/backend/opengl/DepthStencilStateGL.h
@ -93,7 +93,7 @@ list(APPEND COCOS_RENDERER_HEADER
renderer/backend/opengl/RenderTargetGL.h
)
list(APPEND COCOS_RENDERER_SRC
list(APPEND _AX_RENDERER_SRC
renderer/backend/opengl/BufferGL.cpp
renderer/backend/opengl/CommandBufferGL.cpp
renderer/backend/opengl/DepthStencilStateGL.cpp
@ -109,7 +109,7 @@ list(APPEND COCOS_RENDERER_SRC
else()
list(APPEND COCOS_RENDERER_HEADER
list(APPEND _AX_RENDERER_HEADER
renderer/backend/metal/BufferMTL.h
renderer/backend/metal/BufferManager.h
renderer/backend/metal/CommandBufferMTL.h
@ -124,7 +124,7 @@ list(APPEND COCOS_RENDERER_HEADER
renderer/backend/metal/DeviceInfoMTL.h
)
list(APPEND COCOS_RENDERER_SRC
list(APPEND _AX_RENDERER_SRC
renderer/backend/metal/BufferMTL.mm
renderer/backend/metal/BufferManager.mm
renderer/backend/metal/CommandBufferMTL.mm

View File

@ -1,32 +1,32 @@
if(WINDOWS)
if(AX_ENABLE_MSEDGE_WEBVIEW2)
set(COCOS_UI_SPECIFIC_HEADER
set(_AX_UI_SPECIFIC_HEADER
ui/UIEditBox/UIEditBoxImpl-win32.h
ui/UIWebView/UIWebViewImpl-win32.h
ui/UIWebView/UIWebView.h
)
set(COCOS_UI_SPECIFIC_SRC
set(_AX_UI_SPECIFIC_SRC
ui/UIEditBox/UIEditBoxImpl-win32.cpp
ui/UIWebView/UIWebViewImpl-win32.cpp
ui/UIWebView/UIWebView.cpp
)
else()
set(COCOS_UI_SPECIFIC_HEADER
set(_AX_UI_SPECIFIC_HEADER
ui/UIEditBox/UIEditBoxImpl-win32.h
)
set(COCOS_UI_SPECIFIC_SRC
set(_AX_UI_SPECIFIC_SRC
ui/UIEditBox/UIEditBoxImpl-win32.cpp
)
endif()
if (AX_ENABLE_MFMEDIA)
set(COCOS_UI_SPECIFIC_HEADER ${COCOS_UI_SPECIFIC_HEADER}
set(_AX_UI_SPECIFIC_HEADER ${_AX_UI_SPECIFIC_HEADER}
ui/UIVideoPlayer/MFUtils.h
ui/UIVideoPlayer/MFMediaPlayer.h
ui/UIVideoPlayer/UIVideoPlayer.h
)
set(COCOS_UI_SPECIFIC_SRC ${COCOS_UI_SPECIFIC_SRC}
set(_AX_UI_SPECIFIC_SRC ${_AX_UI_SPECIFIC_SRC}
ui/UIVideoPlayer/MFUtils.cpp
ui/UIVideoPlayer/MFMediaPlayer.cpp
ui/UIVideoPlayer/UIVideoPlayer-win.cpp
@ -34,7 +34,7 @@ if(WINDOWS)
endif()
elseif(APPLE)
if(MACOSX)
set(COCOS_UI_SPECIFIC_HEADER
set(_AX_UI_SPECIFIC_HEADER
ui/UIEditBox/UIEditBoxImpl-mac.h
ui/UIEditBox/Mac/CCUIPasswordTextField.h
ui/UIEditBox/Mac/CCUIMultilineTextField.h
@ -43,7 +43,7 @@ elseif(APPLE)
ui/UIEditBox/Mac/CCUISingleLineTextField.h
ui/UIEditBox/Mac/CCUITextFieldFormatter.h
)
set(COCOS_UI_SPECIFIC_SRC
set(_AX_UI_SPECIFIC_SRC
ui/UIEditBox/UIEditBoxImpl-mac.mm
ui/UIEditBox/Mac/CCUIEditBoxMac.mm
ui/UIEditBox/Mac/CCUIMultilineTextField.m
@ -52,7 +52,7 @@ elseif(APPLE)
ui/UIEditBox/Mac/CCUITextFieldFormatter.m
)
elseif(IOS)
set(COCOS_UI_SPECIFIC_HEADER
set(_AX_UI_SPECIFIC_HEADER
ui/UIWebView/UIWebView.h
ui/UIVideoPlayer/UIVideoPlayer.h
ui/UIWebView/UIWebViewImpl-ios.h
@ -64,7 +64,7 @@ elseif(APPLE)
ui/UIEditBox/iOS/UITextField+CCUITextInput.h
ui/UIEditBox/iOS/CCUISingleLineTextField.h
)
set(COCOS_UI_SPECIFIC_SRC
set(_AX_UI_SPECIFIC_SRC
ui/UIWebView/UIWebView.mm
ui/UIVideoPlayer/UIVideoPlayer-ios.mm
ui/UIWebView/UIWebViewImpl-ios.mm
@ -77,20 +77,20 @@ elseif(APPLE)
)
endif()
elseif(LINUX)
set(COCOS_UI_SPECIFIC_HEADER
set(_AX_UI_SPECIFIC_HEADER
ui/UIEditBox/UIEditBoxImpl-linux.h
)
set(COCOS_UI_SPECIFIC_SRC
set(_AX_UI_SPECIFIC_SRC
ui/UIEditBox/UIEditBoxImpl-linux.cpp
)
elseif(ANDROID)
set(COCOS_UI_SPECIFIC_HEADER
set(_AX_UI_SPECIFIC_HEADER
ui/UIWebView/UIWebView.h
ui/UIVideoPlayer/UIVideoPlayer.h
ui/UIWebView/UIWebViewImpl-android.h
ui/UIEditBox/UIEditBoxImpl-android.h
)
set(COCOS_UI_SPECIFIC_SRC
set(_AX_UI_SPECIFIC_SRC
ui/UIEditBox/UIEditBoxImpl-android.cpp
ui/UIVideoPlayer/UIVideoPlayer-android.cpp
ui/UIWebView/UIWebViewImpl-android.cpp
@ -99,8 +99,8 @@ elseif(ANDROID)
)
endif()
set(COCOS_UI_HEADER
${COCOS_UI_SPECIFIC_HEADER}
set(_AX_UI_HEADER
${_AX_UI_SPECIFIC_HEADER}
ui/CocosGUI.h
ui/GUIDefine.h
ui/GUIExport.h
@ -135,8 +135,8 @@ set(COCOS_UI_HEADER
ui/UIWidget.h
)
set(COCOS_UI_SRC
${COCOS_UI_SPECIFIC_SRC}
set(_AX_UI_SRC
${_AX_UI_SPECIFIC_SRC}
ui/CocosGUI.cpp
ui/UIButton.cpp
ui/UIAbstractCheckButton.cpp

View File

@ -28,7 +28,7 @@ if(BUILD_SHARED_LIBS)
cmake_policy(SET CMP0079 NEW)
endif()
function(setup_cocos_extension_config target_name)
function(setup_ax_extension_config target_name)
set(options DNTLINK opt_DNTLINK)
cmake_parse_arguments(opt "" "${options}" ""
"" ${ARGN} )
@ -59,7 +59,7 @@ function(setup_cocos_extension_config target_name)
endif()
if(XCODE OR VS)
cocos_mark_code_files("${target_name}")
ax_mark_code_files("${target_name}")
endif()
endfunction()

View File

@ -4,4 +4,4 @@ FILE(GLOB_RECURSE DRAGONBONES_SOURCES ./*.h;./*.cpp)
add_library(${target_name} STATIC ${DRAGONBONES_SOURCES})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -12,4 +12,4 @@ add_library(${target_name}
target_include_directories(${target_name} INTERFACE ${CMAKE_CURRENT_LIST_DIR})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -68,4 +68,4 @@ add_library(${target_name} STATIC
${HEADER}
${SOURCE})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -42,6 +42,6 @@ else()
target_link_libraries(${LIB_NAME} Live2DCubismCore)
endif()
setup_cocos_extension_config(${LIB_NAME})
setup_ax_extension_config(${LIB_NAME})
unset(LIB_NAME)

View File

@ -4,4 +4,4 @@ FILE(GLOB PARTICLE3D_SOURCES *.h;*.cpp;./**/*.h;./**/*.cpp)
add_library(${target_name} ${PARTICLE3D_SOURCES})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -7,5 +7,5 @@ add_library(${target_name}
${ASSETS_MANAGER_HEADER}
${ASSETS_MANAGER_SOURCE})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -16,4 +16,4 @@ endif()
target_include_directories(${target_name} PUBLIC ${CMAKE_CURRENT_LIST_DIR})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -7,4 +7,4 @@ add_library(${target_name} STATIC ${FAIRYGUI_SOURCES})
target_include_directories(${target_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -4,4 +4,4 @@ FILE(GLOB PHYSICS_NODES_SOURCES *.h;*.cpp;./**/*.h;./**/*.cpp)
add_library(${target_name} ${PHYSICS_NODES_SOURCES})
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -1,4 +1,4 @@
set(cocos_root ${AXYS_ROOT_PATH})
set(ax_root ${AXYS_ROOT_PATH})
set(lua_bindings_manual_headers
manual/CCComponentLua.h
@ -165,18 +165,18 @@ endif()
set(lua_bindings_files
${lua_bindings_manual_files}
${lua_bindings_auto_files}
${COCOS_DEPRECATED_SRC}
${_AX_DEPRECATED_SRC}
)
set(lua_bindings_headers
${lua_bindings_manual_headers}
${lua_bindings_auto_headers}
${COCOS_DEPRECATED_HEADER}
${_AX_DEPRECATED_HEADER}
)
set(lua_bindings_files
${lua_bindings_files}
"${cocos_root}/thirdparty/yasio/bindings/lyasio.cpp"
"${cocos_root}/thirdparty/yasio/bindings/yasio_cclua.cpp")
"${ax_root}/thirdparty/yasio/bindings/lyasio.cpp"
"${ax_root}/thirdparty/yasio/bindings/yasio_cclua.cpp")
list(APPEND lua_bindings_files ${lua_bindings_headers})
@ -194,13 +194,13 @@ get_target_property(lua_ext_depend thirdparty AX_LUA_DEPEND)
target_link_libraries(${_AX_LUA_LIB} ${lua_ext_depend})
target_include_directories(${_AX_LUA_LIB}
PUBLIC ${cocos_root}/thirdparty/lua
PUBLIC ${ax_root}/thirdparty/lua
PRIVATE manual/platform/android
PRIVATE manual/platform/android/jni
PRIVATE ${cocos_root}/extensions/spine/runtime/include
PRIVATE ${cocos_root}/extensions/cocostudio
INTERFACE ${cocos_root}/extensions/scripting/lua-bindings/manual
PRIVATE ${cocos_root}/extensions/spine/runtime/include
PRIVATE ${ax_root}/extensions/spine/runtime/include
PRIVATE ${ax_root}/extensions/cocostudio
INTERFACE ${ax_root}/extensions/scripting/lua-bindings/manual
PRIVATE ${ax_root}/extensions/spine/runtime/include
)
if(WINDOWS)
@ -210,8 +210,8 @@ endif()
if(AX_ENABLE_MSEDGE_WEBVIEW2)
endif()
axis_config_pred(${_AX_LUA_LIB} AX_ENABLE_MFMEDIA)
axis_config_pred(${_AX_LUA_LIB} AX_ENABLE_MSEDGE_WEBVIEW2)
ax_config_pred(${_AX_LUA_LIB} AX_ENABLE_MFMEDIA)
ax_config_pred(${_AX_LUA_LIB} AX_ENABLE_MSEDGE_WEBVIEW2)
set_target_properties(${_AX_LUA_LIB}
PROPERTIES
@ -221,6 +221,6 @@ set_target_properties(${_AX_LUA_LIB}
)
if(XCODE OR VS)
cocos_mark_code_files("${_AX_LUA_LIB}")
ax_mark_code_files("${_AX_LUA_LIB}")
endif()

View File

@ -1,16 +1,16 @@
set(target_name spine)
file(GLOB_RECURSE COCOS_SPINE_SRC
file(GLOB_RECURSE _AX_SPINE_SRC
${CMAKE_CURRENT_LIST_DIR}/*.cpp
${CMAKE_CURRENT_LIST_DIR}/**/*.cpp
)
file(GLOB_RECURSE COCOS_SPINE_HEADER
file(GLOB_RECURSE _AX_SPINE_HEADER
${CMAKE_CURRENT_LIST_DIR}/*.h
${CMAKE_CURRENT_LIST_DIR}/**/*.h
)
add_library(${target_name} ${COCOS_SPINE_HEADER} ${COCOS_SPINE_SRC})
add_library(${target_name} ${_AX_SPINE_HEADER} ${_AX_SPINE_SRC})
if(BUILD_SHARED_LIBS)
target_compile_definitions(${target_name}
@ -21,4 +21,4 @@ endif()
target_include_directories(${target_name} PUBLIC "runtime/include")
setup_cocos_extension_config(${target_name})
setup_ax_extension_config(${target_name})

View File

@ -71,7 +71,7 @@ set(GAME_RES_FOLDER
"${CMAKE_CURRENT_SOURCE_DIR}/Resources"
)
if(APPLE OR WINDOWS)
cocos_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
ax_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
endif()
# add cross-platforms source files and header files
@ -160,7 +160,7 @@ target_include_directories(${APP_NAME}
)
# mark app resources
setup_cocos_app_config(${APP_NAME})
setup_ax_app_config(${APP_NAME})
if(APPLE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
@ -177,13 +177,13 @@ if(APPLE)
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
if(NOT _AX_USE_PREBUILT)
cocos_copy_target_dll(${APP_NAME})
ax_copy_target_dll(${APP_NAME})
endif()
endif()
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
ax_get_resource_path(APP_RES_DIR ${APP_NAME})
ax_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
elseif(WINDOWS)
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${GAME_RES_FOLDER}")
if(NOT DEFINED BUILD_ENGINE_DONE)
@ -202,5 +202,5 @@ if (_AX_USE_PREBUILT) # support windows only
use_ax_compile_define(${APP_NAME})
include(${AXYS_ROOT_PATH}/cmake/Modules/AXLinkHelpers.cmake)
axis_link_cxx_prebuilt(${APP_NAME} ${AXYS_ROOT_PATH} ${AX_PREBUILT_DIR})
ax_link_cxx_prebuilt(${APP_NAME} ${AXYS_ROOT_PATH} ${AX_PREBUILT_DIR})
endif()

View File

@ -80,11 +80,11 @@ set(res_script_folders
"${AXYS_ROOT_PATH}/extensions/scripting/lua-bindings/script"
)
if(APPLE OR VS)
cocos_mark_multi_resources(res_res RES_TO "Resources/res" FOLDERS ${res_res_folders})
cocos_mark_multi_resources(res_src RES_TO "Resources/src" FOLDERS ${res_src_folders})
ax_mark_multi_resources(res_res RES_TO "Resources/res" FOLDERS ${res_res_folders})
ax_mark_multi_resources(res_src RES_TO "Resources/src" FOLDERS ${res_src_folders})
set(cc_common_res ${res_res} ${res_src})
if (NOT _AX_TOP_LEVEL_APP)
cocos_mark_multi_resources(res_script RES_TO "Resources/src/cocos" FOLDERS ${res_script_folders})
ax_mark_multi_resources(res_script RES_TO "Resources/src/axys" FOLDERS ${res_script_folders})
set(cc_common_res ${cc_common_res} ${res_script})
endif()
endif()
@ -166,7 +166,7 @@ endif()
target_include_directories(${APP_NAME} PRIVATE ${RUNTIME_SRC_ROOT}/Classes)
# mark app resources, resource will be copy auto after mark
setup_cocos_app_config(${APP_NAME})
setup_ax_app_config(${APP_NAME})
if(APPLE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
@ -186,19 +186,19 @@ if(APPLE)
endif()
elseif(WINDOWS)
if(NOT _AX_USE_PREBUILT)
cocos_copy_target_dll(${APP_NAME})
cocos_copy_lua_dlls(${APP_NAME})
ax_copy_target_dll(${APP_NAME})
ax_copy_lua_dlls(${APP_NAME})
endif()
endif()
# copy resource on linux or WINDOWS
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR}/res FOLDERS ${res_res_folders})
cocos_copy_lua_scripts(${APP_NAME} ${res_src_folders} ${APP_RES_DIR}/src )
cocos_copy_lua_scripts(${APP_NAME} ${res_script_folders} ${APP_RES_DIR}/src/cocos)
ax_get_resource_path(APP_RES_DIR ${APP_NAME})
ax_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR}/res FOLDERS ${res_res_folders})
ax_copy_lua_scripts(${APP_NAME} ${res_src_folders} ${APP_RES_DIR}/src )
ax_copy_lua_scripts(${APP_NAME} ${res_script_folders} ${APP_RES_DIR}/src/axys)
elseif(WINDOWS)
set(my_res_folder "${CMAKE_CURRENT_SOURCE_DIR}")
cocos_copy_lua_scripts(${APP_NAME} ${res_script_folders} "${my_res_folder}/src/cocos")
ax_copy_lua_scripts(${APP_NAME} ${res_script_folders} "${my_res_folder}/src/axys")
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${my_res_folder}")
if(NOT DEFINED BUILD_ENGINE_DONE)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME})
@ -216,5 +216,5 @@ if (_AX_USE_PREBUILT) # support windows only
use_ax_compile_define(${APP_NAME})
include(${AXYS_ROOT_PATH}/cmake/Modules/AXLinkHelpers.cmake)
axis_link_lua_prebuilt(${APP_NAME} ${AXYS_ROOT_PATH} ${AX_PREBUILT_DIR})
ax_link_lua_prebuilt(${APP_NAME} ${AXYS_ROOT_PATH} ${AX_PREBUILT_DIR})
endif()

View File

@ -41,7 +41,7 @@ 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})
ax_mark_multi_resources(cc_common_res RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
endif()
if(ANDROID)
@ -557,7 +557,7 @@ if(WIN64)
endif()
# mark app resources
setup_cocos_app_config(${APP_NAME})
setup_ax_app_config(${APP_NAME})
if(APPLE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
@ -573,12 +573,12 @@ if(APPLE)
# For code-signing, set the DEVELOPMENT_TEAM:
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
ax_copy_target_dll(${APP_NAME})
endif()
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
ax_get_resource_path(APP_RES_DIR ${APP_NAME})
ax_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
elseif(WINDOWS)
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${GAME_RES_FOLDER}")
endif()

View File

@ -54,7 +54,7 @@ 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})
ax_mark_multi_resources(cc_common_res RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
endif()
if(ANDROID)
@ -126,7 +126,7 @@ target_link_libraries(${APP_NAME} ${_AX_CORE_LIB})
target_include_directories(${APP_NAME} PRIVATE Classes)
setup_cocos_app_config(${APP_NAME})
setup_ax_app_config(${APP_NAME})
if(XCODE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
@ -142,12 +142,12 @@ if(XCODE)
# For code-signing, set the DEVELOPMENT_TEAM:
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
ax_copy_target_dll(${APP_NAME})
endif()
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
ax_get_resource_path(APP_RES_DIR ${APP_NAME})
ax_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
elseif(WINDOWS)
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${GAME_RES_FOLDER}")
endif()

View File

@ -60,7 +60,7 @@ set(GAME_RES_FOLDER
"${CMAKE_CURRENT_SOURCE_DIR}/Resources"
)
if(APPLE OR WINDOWS)
cocos_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
ax_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
endif()
if(ANDROID)
@ -137,7 +137,7 @@ target_include_directories(${APP_NAME}
)
# mark app resources
setup_cocos_app_config(${APP_NAME})
setup_ax_app_config(${APP_NAME})
if(APPLE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
@ -153,12 +153,12 @@ if(APPLE)
# For code-signing, set the DEVELOPMENT_TEAM:
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
ax_copy_target_dll(${APP_NAME})
endif()
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
ax_get_resource_path(APP_RES_DIR ${APP_NAME})
ax_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
elseif(WINDOWS)
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${GAME_RES_FOLDER}")
endif()

View File

@ -55,10 +55,10 @@ set(res_script_folders
"${AXYS_ROOT_PATH}/extensions/scripting/lua-bindings/script"
)
if(APPLE OR VS)
cocos_mark_multi_resources(res_res RES_TO "Resources/res" FOLDERS ${res_res_folders})
cocos_mark_multi_resources(res_src RES_TO "Resources/src" FOLDERS ${res_src_folders})
ax_mark_multi_resources(res_res RES_TO "Resources/res" FOLDERS ${res_res_folders})
ax_mark_multi_resources(res_src RES_TO "Resources/src" FOLDERS ${res_src_folders})
set(cc_common_res ${res_res} ${res_src})
cocos_mark_multi_resources(res_script RES_TO "Resources/src/cocos" FOLDERS ${res_script_folders})
ax_mark_multi_resources(res_script RES_TO "Resources/src/axys" FOLDERS ${res_script_folders})
set(cc_common_res ${cc_common_res} ${res_script})
endif()
@ -141,7 +141,7 @@ if(WIN64)
endif()
# mark app resources
setup_cocos_app_config(${APP_NAME})
setup_ax_app_config(${APP_NAME})
if(APPLE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)")
@ -163,19 +163,19 @@ if(APPLE)
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
if(NOT _AX_USE_PREBUILT)
cocos_copy_target_dll(${APP_NAME})
cocos_copy_lua_dlls(${APP_NAME})
ax_copy_target_dll(${APP_NAME})
ax_copy_lua_dlls(${APP_NAME})
endif()
endif()
if((WINDOWS AND (CMAKE_GENERATOR STREQUAL "Ninja")) OR LINUX)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR}/res FOLDERS ${res_res_folders})
cocos_copy_lua_scripts(${APP_NAME} ${res_src_folders} ${APP_RES_DIR}/src )
cocos_copy_lua_scripts(${APP_NAME} ${res_script_folders} ${APP_RES_DIR}/src/cocos)
ax_get_resource_path(APP_RES_DIR ${APP_NAME})
ax_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR}/res FOLDERS ${res_res_folders})
ax_copy_lua_scripts(${APP_NAME} ${res_src_folders} ${APP_RES_DIR}/src )
ax_copy_lua_scripts(${APP_NAME} ${res_script_folders} ${APP_RES_DIR}/src/axys)
elseif(WINDOWS)
set(my_res_folder "${CMAKE_CURRENT_SOURCE_DIR}/..")
cocos_copy_lua_scripts(${APP_NAME} ${res_script_folders} "${my_res_folder}/src/cocos")
cocos_copy_target_res(${APP_NAME} LINK_TO "${my_res_folder}/res" FOLDERS "${AXYS_ROOT_PATH}/tests/cpp-tests/Resources")
ax_copy_lua_scripts(${APP_NAME} ${res_script_folders} "${my_res_folder}/src/axys")
ax_copy_target_res(${APP_NAME} LINK_TO "${my_res_folder}/res" FOLDERS "${AXYS_ROOT_PATH}/tests/cpp-tests/Resources")
set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${my_res_folder}")
if(NOT DEFINED BUILD_ENGINE_DONE)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME})
@ -190,5 +190,5 @@ endif()
if (_AX_USE_PREBUILT) # support windows only
include(${AXYS_ROOT_PATH}/cmake/Modules/AXLinkHelpers.cmake)
axis_link_lua_prebuilt(${APP_NAME} ${AXYS_ROOT_PATH} ${AX_PREBUILT_DIR})
ax_link_lua_prebuilt(${APP_NAME} ${AXYS_ROOT_PATH} ${AX_PREBUILT_DIR})
endif()