0

My project is located in this filepath:

C:\Users\zaina\OneDrive\foo_directory\bar_projectname

The libraries and git repositories, which I want to use globally, are located in this file path:

C:\dev\github\foobar

For example This repository is about controlling Tello drone with c++ language, and I cloned this

I used Cmake GUI to configure the build and Visual Studio to build the libraries, but I simply can't include it in my project by invoking:

#include <tello/tello.hpp>

So there must be something that might help.

I tried git submodules and it worked fine, but it only works for a single project and not globally.

So I was wondering that is there a possibility to set a cloned repository as a global library or create one. If it is, then how?

I tried this as my CMakeLists.txt:

project(foo)

# Setup testing
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

enable_testing()
  
add_executable(foo main.cpp)
target_include_directories(foo PRIVATE ${tello_SOURCE_DIR}/src)

target_link_libraries(tello_test PRIVATE tello)

But that did not work, because my program can't find the tello header files.

torek
  • 448,244
  • 59
  • 642
  • 775
Zain Ahmed
  • 17
  • 4

0 Answers0