Question: CMake Questions Let us consider adding an object to our project (we use cmake to create Makefiles). We have defined the object in my object.h

CMake Questions

Let us consider adding an object to our project (we use cmake to

create Makefiles). We have defined the object in my object.h and

provide the implementation details (e.g., constructors, destructors,

member functions) in my object.cpp. Where in the directory struc-

ture would you place these two files?

Replace this text with your response.

Let us further assume that in the implementation of your new object

you are using functions from a third party library called libmatrix.

You know that the header you are including for this (matrix.h) is

located in /usr/include/libmatrix/. Since this is a library the linker

should also link libmatrix.a which is located in /usr/lib/libmatrix/.

How would you need to modify the CMakeLists.txt file (include fold-

ers, library folders, linkables)?

Replace this text with your response.

Digging more into libmatrix, you find that it came with a pkg-config

description. In this case, how would you need to modify the CMake-

Lists.txt file (include folders, library folders, linkables)?

Replace this text with your response

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!