Category : cmake

I have a project structure that looks something like: app compile/vs/mingw/etc appSrc/cpp/h/etc docs/ main.cpp build/debug build/release As far as I can tell, everywhere where I need this library/etc. I would just do include_directories(app) but now when I look at External Libraries I can see that apart from appSrc/ I also got all the build, compile, ..

Read more

In the following project structure(from my previous question): root/ ├─ CMakeLists.txt ├─ protocol/ │ ├─ msg.proto │ ├─ myrpc.proto │ ├─ CMakeLists.txt ├─ app/ │ ├─ main.cpp │ ├─ CMakeLists.txt I could generate the protobuf files and add them as dependency into the app target. Now I am trying to generate grpc files inside the ..

Read more

I’m using antlr4-4.9.2 on Windows 10. I want to use antlr4 in c++, and here’s part of my CMakeLists.txt file(GLOB antlr4-cpp-src third_party/antlr4-cpp-runtime-4.9.2/src/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/atn/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/dfa/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/misc/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/support/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/tree/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/tree/pattern/*.cpp third_party/antlr4-cpp-runtime-4.9.2/src/tree/xpath/*.cpp ) add_library (antlr4-cpp-runtime ${antlr4-cpp-src}) add_executable(MiniSql ${src_dir} src/main.cpp) target_link_libraries(MiniSql antlr4-cpp-runtime) But I got 171 errors and warnings. For example, in BufferedTokenStream, TokenSource *BufferedTokenStream::getTokenSource() const { return _tokenSource; ..

Read more

I’m trying to use cmake build an empty project of mine over the command line. My project has this barebones file structure -Project -Build -CMakeLists.txt (empty file) -main.cpp (contains hello world and nothing else) I’m running the command "cmake .." in the build folder of the project However I’m getting this error… CMake Warning (dev) ..

Read more

When i run cmake .. I recieve the following error: CMake Error at CMakeLists.txt:20 (find_package): Could not find a configuration file for package "SDL2" that is compatible with requested version "". The following configuration files were considered but not accepted: C:/Users/Miguel/Documents/vcpkg/installed/x64-windows/share/sdl2/SDL2Config.cmake, version: 2.0.16 (64bit) — Configuring incomplete, errors occurred! I dont know witch version should ..

Read more