axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

[Windows] Live2D: CMake Configure step failed. Build files cannot be regenerated correctly. #1502

Closed aismann closed 9 months ago

aismann commented 9 months ago

I use all extensions: -- Enabled axmol extensions:JSONDefault;EffekseerForCocos2d-x;cocostudio;SDFGen;Inspector;ImGui;fairygui;DragonBones;spine;physics-nodes;particle3d;assets-manager;GUI;

CMake Warning at extensions/Live2D/Framework/src/Rendering/CMakeLists.txt:8 (message): [Live2D] Set 'FRAMEWORK_SOURCE' variable to 'axmol' when using axmol rendering.

CMake Error at extensions/CMakeLists.txt:14 (target_link_libraries):
  The plain signature for target_link_libraries has already been used with
  the target "Live2D".  All uses of target_link_libraries with a target must
  be either all-keyword or all-plain.

The uses of the plain signature are here:

Call Stack (most recent call first): extensions/Live2D/CMakeLists.txt:53 (setup_ax_extension_config)

....

-- Enabled axmol extensions:JSONDefault;EffekseerForCocos2d-x;cocostudio;SDFGen;Inspector;ImGui;fairygui;DragonBones;spine;physics-nodes;particle3d;assets-manager;GUI; -- CMAKE_BINARY_DIR=D:/__GIT/axmol/build_x64 -- No shader found in D:/GIT/axmol/templates/cpp-template-default/Source/shaders -- 50 shader sources found in D:/GIT/axmol/tests/cpp-tests/Source/shaders CMake cpp-tests target_precompile_headers -- No shader found in D:/GIT/axmol/tests/fairygui-tests/Source/shaders CMake fairygui-tests target_precompile_headers -- 2 shader sources found in D:/GIT/axmol/tests/live2d-tests/Source/shaders CMake live2d-tests target_precompile_headers -- No shader found in D:/GIT/axmol/templates/lua-template-default/Source/shaders -- No shader found in D:/GIT/axmol/tests/lua-tests/Source/shaders -- Configuring incomplete, errors occurred! CMake Configure step failed. Build files cannot be regenerated correctly. build1k: Build done

rh101 commented 9 months ago

Which platform are you targeting? (the "Bug report" template would have served as a reminder)

rh101 commented 9 months ago

In Live2D/CMakeLists.txt, change this line:

setup_ax_extension_config(${LIB_NAME} LINK_SCOPE PRIVATE)

to this:

if (ANDROID)
    setup_ax_extension_config(${LIB_NAME} LINK_SCOPE PRIVATE)
else()
    setup_ax_extension_config(${LIB_NAME})
endif()

Please check if it fixes the issue.

rh101 commented 9 months ago

@aismann It should be fixed now in #1503

aismann commented 9 months ago

Please check if it fixes the issue.

Works now. Thanks.