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
922 stars 205 forks source link

Disabling extensions causes linker errors using prebuilt #1558

Closed iAndyHD3 closed 10 months ago

iAndyHD3 commented 10 months ago
  1. Configure engine without tests and disabling extensions
    cmake -B build_x64 -A x64 -DAX_BUILD_TESTS=OFF -DAX_ENABLE_EXT_ASSETMANAGER=OFF -DAX_ENABLE_EXT_PARTICLE3D=OFF -DAX_ENABLE_EXT_PHYSICS_NODE=OFF -DAX_ENABLE_EXT_SPINE=OFF -DAX_ENABLE_EXT_DRAGONBONES=OFF -DAX_ENABLE_EXT_COCOSTUDIO=OFF -DAX_ENABLE_EXT_FAIRYGUI=OFF -DAX_ENABLE_EXT_JSONDEFAULT=OFF -DAX_ENABLE_EXT_SDFGEN=OFF -DAX_ENABLE_EXT_LUA=OFF
  2. Build engine cmake --build build_x64 --config RelWithDebInfo
  3. Create test project axmol new test new -p org.axmol.hellocpp -l cpp --portrait HelloCpp
  4. Configure project without extensions
    cmake -B build_x64 -A x64 -DAX_PREBUILT_DIR=build_x64 -DAX_ENABLE_EXT_ASSETMANAGER=OFF -DAX_ENABLE_EXT_PARTICLE3D=OFF -DAX_ENABLE_EXT_PHYSICS_NODE=OFF -DAX_ENABLE_EXT_SPINE=OFF -DAX_ENABLE_EXT_DRAGONBONES=OFF -DAX_ENABLE_EXT_COCOSTUDIO=OFF -DAX_ENABLE_EXT_FAIRYGUI=OFF -DAX_ENABLE_EXT_JSONDEFAULT=OFF -DAX_ENABLE_EXT_SDFGEN=OFF -DAX_ENABLE_EXT_LUA=OFF
  5. Build test project cmake --build build_x64 --config RelWithDebInfo

I am getting the following: LINK : fatal error LNK1104: cannot open file 'spine.lib'. It seems like extensions are not being disabled correctly, after building spine extension in engine i get LINK : fatal error LNK1104: cannot open file 'particle3d.lib'

Can anyone reproduce?

rh101 commented 10 months ago

Can reproduce this issue, but only when using the AX_PREBUILT_DIR option.