[tng-devel] CMake updates |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/tng-devel Archives
]
Dear all,
today I simplified the way how our CMake system works. (I plan to
simplify it further in the far future). Still, the dependency checking
will not work perfectly, but defining modules and exernal libs is much
easier now.
There exists
FindExternals.cmake
which will prepare ALL external libraries. It defines include
directories and the location of the libs. The libs must be order
according to the linker setting. The subroutine is called by the main
CMakeLists.txt
All FindModuleXXX.cmake files have been removed.
All module include directories will be stored in the global variable
LIST_TOTAL_INCLUDE_DIRS_OF_MODULES
All module library names will be generated from the given target name
(it is basically identical).
Therefore, when adding a module to a driver, one only has to tell the
driver the new dependency (in drivers/CMakeLists.txt) and that is all.
In order to define a module,
- tell CMake its existence in modules/CMakeLists.txt
- create directories: modules/mymodule - main dir
modules/mymodule/mymodule - C++ sources
modules/mymodule/swig - SWIG input file
modules/mymodule/doc - Doxygen files
modules/mymodule/test - C++ sources for test drivers
- modules/mymodule/CMakeLists.txt defines
- the directories relative to modules/mymodule/mymodule which are
searched for source files
- the test drivers (if any)
- the dependence on other modules (required to compile test drivers)
- a flag if there exists a SWIG wrapper module
- a flag if there exists a test environment
- a flag if there exists a Doxygen template
- Check other CMakeLists.txt files for advice.
Best regards
SW