Relative Content

Tag Archive for c++cmake

How to call make install after building the target

I have a library project mk_lib which creates a shared library mk_lib.so when built using make command. I then install this library to /usr/local/lib/ using the command sudo make install. The library header file lib.h is also installed to /usr/local/include/ using install command. The main executable makes use of the mk_lib library. This library is made available using sudo ldconfig command which makes path /usr/local/lib/ as library search path during executable mk_demo creation. I want to know is it possible to perform the three library related actions (creation using make and installation using sudo make install to copy library to /usr/local/lib/ and install header file lib.h to usr/local/include) as one command instead of executing them separately. Basically if library build is successful then automatically call install commands else don’t.

How to call make install after building the target

I have a library project mk_lib which creates a shared library mk_lib.so when built using make command. I then install this library to /usr/local/lib/ using the command sudo make install. The library header file lib.h is also installed to /usr/local/include/ using install command. The main executable makes use of the mk_lib library. This library is made available using sudo ldconfig command which makes path /usr/local/lib/ as library search path during executable mk_demo creation. I want to know is it possible to perform the three library related actions (creation using make and installation using sudo make install to copy library to /usr/local/lib/ and install header file lib.h to usr/local/include) as one command instead of executing them separately. Basically if library build is successful then automatically call install commands else don’t.

CMake ExternalProject cache

I’m including SQLite3 with ExternalProject. I’m using Ninja back-end. My problem is that every time I do a clean, SQLite3 has to be rebuilt and it unnecessarily slows down builds. The library has only to be built once for all build types, unless it’s updated to a new version.

CMakeList.txt,,,,target “cpr::cpr” not found

I finished installing influxdb on my Raspberry Pi and now I want to communicate with influxdb via C++, so I did git clone https://github.com/offa/influxdb-cxx
but I keep getting an error that it can’t find the cpr::cpr target.