If you don't want to include the full path, you can do
add_executable(main main.cpp)
target_link_libraries(main bingitup)
bingitup
is the same name you'd give a target if you create the static library in a CMake project:
add_library(bingitup STATIC bingitup.cpp)
CMake automatically adds the lib
to the front and the .a
at the end on Linux, and .lib
at the end on Windows.
If the library is external, you might want to add the path to the library using
link_directories(/path/to/libraries/)