In CMake, we use TARGET_LINK_LIBRARIES() to link a shared library to an library/executable.
For example: TARGET_LINK_LIBRARIES(ExecutableName xxx) where E
Just specifying the library filename should work:
TARGET_LINK_LIBRARIES(ExecutableName libxxx.a)
and
TARGET_LINK_LIBRARIES(ExecutableName xxx)
actually should work too as that would not look for the .so but for a libxxx.a file in the search paths.