axmol/extensions/spine/CMakeLists.txt

48 lines
1.3 KiB
CMake
Raw Normal View History

set(target_name spine)
file(GLOB_RECURSE COCOS_SPINE_SRC
${CMAKE_CURRENT_LIST_DIR}/*.cpp
${CMAKE_CURRENT_LIST_DIR}/**/*.cpp
)
file(GLOB_RECURSE COCOS_SPINE_HEADER
${CMAKE_CURRENT_LIST_DIR}/*.h
${CMAKE_CURRENT_LIST_DIR}/**/*.h
)
2020-10-17 16:32:16 +08:00
# add_subdirectory(runtime)
# list(REMOVE_ITEM COCOS_SPINE_SRC "${CMAKE_CURRENT_LIST_DIR}/main.cpp")
add_library(${target_name} ${COCOS_SPINE_HEADER} ${COCOS_SPINE_SRC})
if(BUILD_SHARED_LIBS)
target_compile_definitions(${target_name}
PRIVATE SPINEPLUGIN_API=DLLEXPORT
PUBLIC CC_HAVE_EXTENSION_SPINE=1
)
endif()
target_include_directories(${target_name} PUBLIC "runtime/include")
# set_target_properties(spine-cpp
# PROPERTIES
# ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
# LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
# FOLDER "Extensions")
# since 3.6/3.7 c runtime support build as DLL
# since 3.8 cpp runtime is preferred for cocos2d-x
# if(BUILD_EXT_SPINE_CPP)
# add_subdirectory(spine-cpp)
# target_link_libraries(external spine-cpp)
# set_target_properties(spine-cpp
# PROPERTIES
# ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
# LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
# FOLDER "External"
# )
#
# endif(BUILD_EXT_SPINE_CPP)
2020-08-03 20:31:47 +08:00
setup_cocos_extension_config(${target_name})