Fix Linking Errors on AXLinkHelpers.cmake in release/2.11.4 - #3253
Merged
Conversation
Refactor AXLinkHelpers.cmake around these 4 problems:
halx99
reviewed
Jul 29, 2026
halx99
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2026.07.27 Fix Linking Errors on AXLinkHelpers.cmake
Summary
This PR contains several fixes for Axmol 2.11.4. All of them are around Prebuilt Feature in
AXLinkHelpers.cmake:axmol.lib;CMAKE_BUILD_TYPE.When the Prebuilt Function is enabled (
AX_PREBUILT_DIRis defined), most general linking steps are skipped, which consiquently leads to linking errors.Only tested on Windows.
Fixes
Lack of Include Directories for Extensions
With
AX_PREBUILT_DIRdefined, the following scripts would be skipped:All extensions'
CMakeLists.txt, which define subdirectory addition, won't be included.Some extensions, like
FairyGUI, would lack several include directories, causing errors like...Cannot find source file 'FairyGUI.h'(fromOurOwnProjectFile.h);Cannot find source file 'FairyGUIMacros.h'(fromFUILabel.h).Solved by rewriting include dirs according to those inside
CMakeLists.txtfrom every extension.The following script does exist in AXGameEngineSetup.cmake...
so we imitate it and write the following scripts...
Wrong Configuration for Ninja Generator
BUILD_CONFIG_DIRis empty.OpenAL32.dllwith Audio feature enabled, becauseFailing to find
axmol.libCannot find library file: axmol.lib, because the dir structure is:${CMAKE_BUILD_TYPE}toPRIVATE ${AX_ROOT_DIR}/${AX_PREBUILT_DIR}/lib/.Wrong setting for
CMAKE_BUILD_TYPEax_link_cxx_prebuiltindicates that theCMAKE_BUILD_TYPEof every project relies on the one from the Prebuilt Axmol:For example, if Axmol is prebuilt in Release mode, every Axmol Project's
CMAKE_BUILD_TYPEwould be forced toReleaseregardless of its own setting.Visual Studio 2026 would fail to configure the Startup Project and CMake Intellisence;

Visual Studio Code would output, using CMake-Kits Extension, with:
Indicating that current generated project is not configured with
Debug, butRelease.Solved by adding
CMAKE_BUILD_TYPEtoload_cache.Testing
(For example, in folder
D/axmol-2.11.4)cmake -B build_x64 -A x64 "-DAX_BUILD_TESTS=OFF" cmake --build build_x64 --config Release cmake --build build_x64 --config DebugAX_PREBUILT_DIRset (for example,build_x64).AX_PREBUILT_DIR, the project could still be built, but consuming more time to build the whole engine.