Skip to content

Bug Report — USE_SPINE forced ON even when Spine module is disabled (Cocos Creator 3.8.8) #19157

@BenoitFreslon

Description

@BenoitFreslon

Cocos Creator version

3.8.8

System information

Windows 11

Issue description

Environment
Cocos Creator version: 3.8.8
Platform: Android (arm64-v8a, armeabi-v7a)
OS: Windows
Description
When building for Android with the Spine module disabled in Project Settings (both spine-3.8 and spine-4.2 are unchecked), the native CMake build still sets USE_SPINE=ON, causing a fatal compilation error because the Spine runtime headers are not present.

Image

Evidence from build log
The CMake config generated by the editor correctly sets:

(from builder config: "USE_SPINE_3_8":"set(USE_SPINE_3_8 OFF)","USE_SPINE_4_2":"set(USE_SPINE_4_2 OFF)")

However, the resolved CMake options still show:

This results in the compiler flags -DCC_USE_SPINE=1 -DCC_USE_MIDDLEWARE=1, which causes Engine.cpp to include Spine headers:

Expected behavior
When both USE_SPINE_3_8 and USE_SPINE_4_2 are OFF, USE_SPINE should also resolve to OFF. The CMake logic should derive USE_SPINE from the sub-options, e.g.:

Relevant error log output

No response

Steps to reproduce

  1. Create a project in Cocos Creator 3.8.8
  2. In Project Settings > Feature Cropping, disable/uncheck the Spine module (both 3.8 and 4.2)
  3. Build for Android (native)
  4. Build fails with fatal error: 'spine/spine.h' file not found

Minimal reproduction project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds TriageNeeds to be assigned by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions