Skip to content

Tag: cmake

CMAKE_PREFIX_PATH for Qt5

I want to compile this which requires Qt 5.14 and I have Qt 5.12 installed from my linux repository.I just compiled Qt from source and installed it in /usr/local/Qt-6.0.0/(default location). But CMake prints the following error although I’ve added set(CMAKE_PREFIX_PATH “/usr/local/Qt-6.0.0/include…

Building gRPC C++ with CMake on Linux

I’m trying to build gRPC (cpp) using CMake, but running into errors. I am able to successfully build gRPC with make per the instructions on the gRPC cpp page. Using make is deprecated, but CMake isn’t working for me. After following the instructions for downloading, cloning etc., I go to the &#822…

WebAssembly emsdk installation fails

I want to install EMSDK for WASM compilation but EMSDK installation fails. I’ve already installed Cmake (3.14.0-rc1 also tried 3.5.2 then) on Ubuntu 16. When I run ./emsdk install sdk-incoming-64bit binaryen-master-64bit it fails: Answer You are probably missing make as cmake is complaining that there i…

C++ build process – lib dependencies

I have a Visual studio solution with 5 projects Main: application A,B,C,D: static libraries Main depends on A,B. A depends on C,D. I have a fragile understanding of the build process. The libs were building alone fine, especially A; I did not feel I was linking C and D to A. And to build the Main application,…

CMAKE_PREFIX_PATH doesn’t help CMake in finding Qt5

From here: https://stackoverflow.com/a/28327499/462608 I tried this: Here is the output of cmake . This is to show that /opt/Qt5.9.1/ does exist. Here I run the cmake with -DCMAKE option, but the output is still same: Contents of the directory: Answer I installed the following missing packages: Attaching any …

How to use CHECK_LIBRARY_EXISTS in cmake?

Here’s what I have in my CMakeLists.txt: Result: The symbol exists in that library: Why cmake doesn’t find that? Answer It was dependencies. CHECK_LIBRARY_EXISTS is much more complex than nm -D. CMake actually creates a C project that references that library, and tries to link it. I missed some dependen…