I use toolchain for cc65 compiler:
set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_PROCESSOR 6502) ... ... set(CMAKE_LINK_LIBRARY_FLAG "")
And use this like
cmake -DCMAKE_TOOLCHAIN_FILE=cc65.cmake -Bbuild
In this case my CMAKE_LINK_LIBRARY_FLAG is “-l” because is was set in “Modules/CMakeGenericSystem.cmake” after my toolchain.
Is there some way to apply the toolchain AFTER the system one?