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”) and/or set(CMAKE_PREFIX_PATH “/usr/local/Qt-6.0.0/”) : Answer Since it has solved your question, I am just going to put it as
Tag: cmake
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 “Building with CMake”, where it says for Linux/Unix, do
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 is no make program. Try sudo apt-get install build-essential
Shared library versioning with cmake on github
I have a fairly new project on github that produces a shared library. Going forward, I would like to use semantic versioning (as described at semver.org) for the shared library major/minor/patch numbers in the file name. The project uses CMake. The CMakeLists.txt file refers to CPACK_PACKAGE_VERSION_MAJOR, CPACK_PACKAGE_VERSION_MINOR and CPACK_PACKAGE_VERSION_PATCH, and sets these to default values if they are not passed
How to link to Winsock when cross-compiling a Windows app on Linux?
I am porting a Cmake project from Linux to Windows. It uses sockets, so uses pthread in Linux and needs Winsock in Windows. The project is being compiled in Linux, using cross-compilation to create Windows binaries. The project is already compiling fine, and there is a switch to link pthreads when building for Linux and winsock for Windows. However, there
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, I had to
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 kind of prefix is not required now: CMakeList: New output: Errors are
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 dependencies used by that library (libdrm-dev, libxcb-dri2-0, libx11-xcb-dev), so the linker
Can boost lib built on windows with msvc be used in a linux program
I built boost from source on windows. I can compile with it on windows. When I want to compile with it in linux : Unable to find the requested Boost libraries. Boost version: 1.65.1 Boost include path: pathtoproject/deps/boost Could not find the following Boost libraries: No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing
Send request to CMake server from the Linux command line
I would like to play around with the CMake server mode from the Linux command line. The documentation tells me to start CMake like the following: But for me it works only this way: I tried to send a request to the server, but I get only the hello response: How can I send requests to the CMake server? Answer