How set CMAKE_STATIC_LINKER_FLAGS in CMakeLists.txt immediately after the executable file?
for example: I need:
tcc.exe-arqc staticRun.lib CMakeFiles/staticRun.dir/utils/system.c.obj
but cmake after this settings:
set (CMAKE_AR C:/run/code/toolchains/c++/MinGW-tcc/bin/tcc.exe CACHE FILEPATH "" FORCE)
set (CMAKE_STATIC_LINKER_FLAGS -ar CACHE STRING "" FORCE)
add -ar key like this:
tcc.exe qc staticRun.lib CMakeFiles/staticRun.dir/utils/system.c.obj-ar
so, building the static library failed.
P.S.
tcc.exe -ar - mean
Tools: create library : tcc -ar [rcsv] lib.a files
The simplest is just to change the line that is used to run the static library with your custom semantics: