Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake inclusion error. #2697

Open
hsdk123 opened this issue Nov 28, 2024 · 4 comments
Open

cmake inclusion error. #2697

hsdk123 opened this issue Nov 28, 2024 · 4 comments

Comments

@hsdk123
Copy link

hsdk123 commented Nov 28, 2024

Hi, I'm attempting to use spine-cpp with cpm by:

CPMAddPackage(
    NAME spine-runtimes
    GIT_REPOSITORY https://github.com/esotericsoftware/spine-runtimes.git
    GIT_TAG        4.2
    SOURCE_SUBDIR spine-cpp
    SYSTEM ON
)

When I compile, I get:

C:\Users\daego\Desktop\Projects\Light.vn-core\core\out\build\windows-cored\LINK : fatal error LNK1181: cannot open input file 'spine-cpp.lib'
@hsdk123
Copy link
Author

hsdk123 commented Nov 28, 2024

On a separate note, https://en.esotericsoftware.com/spine-cpp#CMake-FetchContent states:

add_subdirectory(${spine-runtimes_SOURCE_DIR}/spine-c ${CMAKE_BINARY_DIR}/spine-runtimes)

whereas I'm guessing should be spine-cpp instead.

@hsdk123
Copy link
Author

hsdk123 commented Nov 28, 2024

I'm also trying


FetchContent_Declare(
 spine-runtimes
 GIT_REPOSITORY https://github.com/esotericsoftware/spine-runtimes.git
 GIT_TAG 4.2
 GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(spine-runtimes)
FetchContent_GetProperties(spine-runtimes)
if(NOT spine-runtimes_POPULATED)
   FetchContent_Populate(spine-runtimes)
endif()
add_subdirectory(${spine-runtimes_SOURCE_DIR}/spine-cpp)

But I see a bunch of

1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlack-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat.meta
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat.meta
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlack-CanvasGroupStraight.mat.meta
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraigAlready on '4.2'
1> [CMake] ht.mat
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat.meta
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat.meta
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat.meta
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat
1> [CMake] D	spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat.meta
1> [CMake] Your branch is up to date with 'origin/4.2'.
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlack-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat: Filename too long
1> [CMake] spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] No stash entries found.
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlack-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] fatal: Could not reset index file to revision 'HEAD'.
1> [CMake] No stash entries found.
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultGrayscale-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicDefaultOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlack-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackAdditive-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackMultiply-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackOutline-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat: Filename too long
1> [CMake] error: unable to create file spine-unity/Assets/Spine/Runtime/spine-unity/Materials/SkeletonGraphic-StaightAlphaTexture/CanvasGroupCompatible/SkeletonGraphicTintBlackScreen-CanvasGroupStraight.mat.meta: Filename too long
1> [CMake] fatal: Could not reset index file to revision '1da920ad74567f84b4b8ab8014087063af529eca'.

I have no idea why unity related files are being pulled in.

@hsdk123
Copy link
Author

hsdk123 commented Nov 28, 2024

I also don't quite understand why both

  • FetchContent_MakeAvailable
  • FetchContent_Populate
    are used in the example. As per the cmake official docs:
It is rarely the right command to use, projects should almost always use [FetchContent_Declare()](https://cmake.org/cmake/help/latest/module/FetchContent.html#command:fetchcontent_declare) and [FetchContent_MakeAvailable()](https://cmake.org/cmake/help/latest/module/FetchContent.html#command:fetchcontent_makeavailable) instead

@hsdk123
Copy link
Author

hsdk123 commented Nov 28, 2024

I think what the docs were intending was more the below instead:

FetchContent_Declare(
 spine-runtimes
 GIT_REPOSITORY https://github.com/esotericsoftware/spine-runtimes.git
 GIT_TAG 4.2
 GIT_SHALLOW TRUE
 SOURCE_SUBDIR spine-cpp
)
FetchContent_MakeAvailable(spine-runtimes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant