Hi
   I recently started working with open source code that uses cmake for
build.  I've been able to make do since most of the CMakeLists.txt files
are provided or specific instructions are given.

   I'm about to embark on my first contribution to build a driver for an
IMU and I want to build an example that is very similar to mine but it's
been "extracted" from an existing code tree, i.e. current CMakeLists.txt
files would port easily.

   I'm having problems constructing what should be a relatively
straightforward CMakeLists.txt file for the extracted code that I want
to run in isolation.  I've been reading tutorials, etc but I don't seem
to get it.  Please consider
taking my general C++ example described below and tell me what (exactly)
the CMakeLists.txt should look.  

[Ubuntu 11.04, cmake 2.8.3, C++ code]

Given:
Top level directory "proj/" and subdir "proj/src"

The proj/ directory shall contain the parent CMakeLists.txt and
proj/src shall contain a child CMakeLists.txt (if
necessary/appropriate).

The src/ directory contains these source related files:

file1.h       >> header only no associated cpp file
file2.h       >> header only " 
file3.h    
file3.cpp
file4.h
file4.cpp
main.cpp

In addition to standard references, some of these files depend on
external library which is found with the FIND_PACKAGE(MRPT REQUIRED
hwdrivers slam)    [note: these libraries come from Mobile Robot
Programming Toolkit]   

Please tell me what the two (or one) CMakeLists.txt file(s) should
contain in order to build this code.

Thanks




--
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to