CMake favours passing the full path to link libraries, so assuming libbingitup.a is in ${CMAKE_SOURCE_DIR}
, doing the following should succeed:
add_executable(main main.cpp)
target_link_libraries(main ${CMAKE_SOURCE_DIR}/libbingitup.a)
More Related Contents:
- CMake link to external library
- Hinting Find.cmake Files with a custom directory
- What’s the CMake syntax to set and use variables?
- CMake does not find includes / libraries
- CMake + GoogleTest
- How to specify a compiler in CMake?
- Combining several static libraries into one using CMake
- What use is find_package() when you need to specify CMAKE_MODULE_PATH?
- CMake: Print out all accessible variables in a script
- Environment variable used by CMake to detect Visual C++ compiler tools for Ninja
- CMake: how create a single shared library from all static libraries of subprojects?
- Why add header files into ADD_LIBRARY/ADD_EXECUTABLE command in CMake
- CMake : How to get the name of all subdirectories of a directory?
- Does CMake offer a method to set the working directory for a given build system to use when running/debugging the project?
- cmake: Selecting a generator within CMakeLists.txt
- Setting CMAKE_INSTALL_PREFIX from CMakeLists.txt file
- Tell CMake to use C++ compiler for C files coming from CMake?
- How do I debug CMakeLists.txt files?
- CMake target_link_libraries Interface Dependencies
- What is common way to split string into list with CMAKE?
- Difference between add_compile_options and SET(CMAKE_CXX_FLAGS…)
- Simple find_package config file example
- cmake add_custom_command
- Check CMake Cache Variable in Toolchain File
- How to tell CMake to use relative paths
- Retrieve all link flags in CMake
- Specifying build directory within CMakeLists file
- How can I debug CMakeLists.txt files?
- Linking GLEW with CMake
- How to print all the properties of a target in cmake?