Question: CSE 2100 practical computer system with raspberry pi: Question-set 1 -- CMake} a). Let us consider adding an object to our project (we use cmake

CSE 2100 practical computer system with raspberry pi:

Question-set 1 -- CMake} a). 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 structure would you place these two files?

b). 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 folders, library folders, linkables)?

c). Digging more into libmatrix, you find that it came with a pkg-config description. In this case, how would you need to modify the CMakeLists.txt file (include folders, library folders, linkables)?

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!