Don't know how to set the CMakeList.exe file to show the box

Concerning processing components: filters, file load/save, visualizations, communication ...
Post Reply
Jeremy
Posts: 3
Joined: Thu Jun 23, 2016 4:47 pm

Don't know how to set the CMakeList.exe file to show the box

Post by Jeremy »

Hi,
I am following the tutorial to implement a new box where the tutorial is : http://openvibe.inria.fr/tutorial-1-imp ... ssing-box/ . However, the box cannot be found in the OpenViBE designer. I followed the tutorial step by step and the ustable box can be shown properly. Just one requirement in the tutorial cannot be understand which is:

"The code should now compile as part of the OpenViBE build. You may have to ‘touch’ (== save with new filesystem timestamp) the CMakeLists.txt file in the parent directory for the build process to include the new files."

I did not get how to set the CMakeLists.txt file, and this is probably the reason why the box cannot be shown. So can anyone help me?

Cheers,
Yue

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Don't know how to set the CMakeList.exe file to show the

Post by jtlindgren »

Hi, you're not telling what tools you use to build the box. Can you get the box to show in Designer at all?

- 'touching' the CMakelists.txt just means writing into it, so CMake will look at the source tree for modifications and include the new files you've introduced. You can open the file to an editor, add an empty line and save it. This has the same effect.
- Every plugin library in openvibe gets turned into its own '.so' or '.dll' file. Each of these libraries has a corresponding ovp_main.cpp file. This is in the src/ folder of the plugin. You need to remember register your box to the kernel in that main cpp file. You can use the existing files as examples how to do that.
- Some tools like 'dumpbin' (win) or 'objdump' (unix) can tell what components the resulting library (.dll or .so) has, you can use that to double check that your stuff is compiled into a lib, though they might not reveal if the box will be properly registered to the kernel or not.


Hope this helps,
Jussi

Jeremy
Posts: 3
Joined: Thu Jun 23, 2016 4:47 pm

Re: Don't know how to set the CMakeList.exe file to show the

Post by Jeremy »

Hi,
I just don't understand this:
'touching' the CMakelists.txt just means writing into it, so CMake will look at the source tree for modifications and include the new files you've introduced. You can open the file to an editor, add an empty line and save it. This has the same effect.
How to write into it? what does it mean "add an empty line and save it"?

Cheers,
Yue

cg_certivibe
Posts: 2
Joined: Thu Jul 21, 2016 1:15 pm

Re: Don't know how to set the CMakeList.exe file to show the

Post by cg_certivibe »

Hi Jeremy,

OpenViBE uses a glob pattern to find all cpp/h files in the source directory. If you add new files (like a new box) to the project,
CMake won't be able to detect the change automatically.

From the CMake doc:
Normally the generated build system knows when it needs to rerun CMake because the CMakeLists.txt file is modified to add a new source. When the source is just added to the directory without modifying this file, one would have to manually rerun CMake to generate a build system incorporating the new file
Thus you can either rerun CMake manually or you need to do a fake change in a CMakeLists.txt (located in the source tree above your modifications) in order to force CMake to re-run.

Thus, what you need to do, is open the CMakeLists.txt in an editor and do a fake change like adding a blank line, then save the changes...

Hope this helps,

Charles

Post Reply