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

Compatibility with Live2D Cubism 4 SDK #2

Open
RW21 opened this issue Aug 12, 2023 · 1 comment
Open

Compatibility with Live2D Cubism 4 SDK #2

RW21 opened this issue Aug 12, 2023 · 1 comment

Comments

@RW21
Copy link

RW21 commented Aug 12, 2023

Hi, thanks for your cool project 👍
I'm not entirely certain about the accuracy of my findings, so I'm opting to leave an issue instead of a direct PR.

I confirmed that this is compatible with Live2D Cubism 4 SDK, with some tweaks needed:

  • In the cmake file, I had to disable add_subdirectory("live2d/Core"), as Core no longer provides a cmakefile.
  • Copy the CubismSdkForNative-4-r.7/Core/Live2dCubismCore.h file to live2d/framework/src
  • Add #include <stdexcept> in Live2LOVE.h as std doesn't provide runtime_error by default?

I've only tested this with Linux, so I can't speak for its functionality with MSVC.

@MikuAuahDark MikuAuahDark mentioned this issue Jan 6, 2024
@isncg
Copy link

isncg commented Mar 5, 2024

The cause of missing header file is that CMake script variable CSM_CORE_INCLUDE_DIR was not set, and it is better to fix include path instead of copy the header file. The CMakeLists.txt has checked the header file:

# Check Live2D source/header files
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/live2d/Core/include/Live2DCubismCore.h")
	message(FATAL_ERROR "Live2D Cubism 3 SDK for Native is missing!")
endif()

and includes these:

target_include_directories(Live2LOVE PRIVATE include live2d/Framework/src ${CSM_CORE_INCLUDE_DIR})

so, I tried to:

set(CSM_CORE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/live2d/Core/include)
# Check Live2D source/header files
if(NOT EXISTS "${CSM_CORE_INCLUDE_DIR}/Live2DCubismCore.h")
	message(FATAL_ERROR "Live2D Cubism 3 SDK for Native is missing!")
endif()
...
# add_subdirectory("live2d/Core")

and it compiles.

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

No branches or pull requests

2 participants