Skip to content

Problem with Axmol V3 #7

@paulocoutinhox

Description

@paulocoutinhox

The CMakeLists.txt have problems with Axmol V3 (branch: dev):

set(target_name spine)

file(GLOB_RECURSE _AX_SPINE_SRC 
    ${CMAKE_CURRENT_LIST_DIR}/*.cpp
    ${CMAKE_CURRENT_LIST_DIR}/**/*.cpp
)

file(GLOB_RECURSE _AX_SPINE_HEADER 
    ${CMAKE_CURRENT_LIST_DIR}/*.h
    ${CMAKE_CURRENT_LIST_DIR}/**/*.h
)

add_library(${target_name} ${_AX_SPINE_HEADER} ${_AX_SPINE_SRC})

if(BUILD_SHARED_LIBS)
    target_compile_definitions(${target_name} 
        PRIVATE SPINEPLUGIN_API=DLLEXPORT
        PUBLIC AX_HAVE_EXTENSION_SPINE=1
    )
endif()

target_include_directories(
    ${target_name} PUBLIC "runtime/include"
    ${target_name} PUBLIC src
)

get_target_property(AX_VERSION ${_AX_CORE_LIB} VERSION)
if (AX_VERSION VERSION_GREATER_EQUAL 2.0)
    ax_find_shaders(${CMAKE_CURRENT_LIST_DIR}/shaders SPINE_SHADER_SOURCES)
    ax_target_compile_shaders(${target_name} FILES ${SPINE_SHADER_SOURCES} CUSTOM)    
endif()

setup_ax_extension_config(${target_name})

Error:


-- CMAKE_HOST_SYSTEM_NAME:Darwin
-- CMAKE_SYSTEM_NAME:Darwin
-- CMAKE_GENERATOR_PLATFORM:
-- CMAKE_SYSTEM_PROCESSOR:arm64
-- CMAKE_CXX_COMPILER_ID:AppleClang
-- FUZZ_MSVC=, FULL_CLANG=
-- PROJECT_NAME:gamemania
-- PROJECT_SOURCE_DIR:/Users/paulo/Developer/workspaces/cpp/gamemania
-- _AX_ROOT:/Users/paulo/Developer/workspaces/cpp/axmol
-- CMAKE_MODULE_PATH:/Users/paulo/Developer/workspaces/cpp/axmol/cmake/Modules/
-- PROJECT_BINARY_DIR:/Users/paulo/Developer/workspaces/cpp/gamemania/build
-- ENGINE_BINARY_PATH:/Users/paulo/Developer/workspaces/cpp/gamemania/build/engine
-- ARCH_ALIAS:
CMake Error at Vendor/spine/CMakeLists.txt:27 (get_target_property):
  get_target_property called with incorrect number of arguments


CMake Error at Vendor/spine/CMakeLists.txt:33 (setup_ax_extension_config):
  Unknown CMake command "setup_ax_extension_config".


-- Configuring incomplete, errors occurred!
build.ps1: /Users/paulo/Developer/workspaces/cpp/axmol/tools/cmdline/axmol.ps1:89
Line |
  89 |          . $build_script @sub_args
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~
     | Generate fail, ret=1
make: *** [build-macos] Error 1

Branch: spine38
Ty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions