cmake-basis / legacy

Legacy CMake BASIS project for versions 3.2 and older. For newer versions, go to
https://github.com/cmake-basis/BASIS
Other
13 stars 11 forks source link

basis_add_module should add <MODULE>_INCLUDE_DIRS #540

Closed schuhschuh closed 8 years ago

schuhschuh commented 8 years ago

The basis_add_module should add the _INCLUDE_DIRS to the search path, or alternatively provide a function basis_use_module that does it, which is called right after basis_add_module by the default basis_project_impl.

schuhschuh commented 8 years ago

Probably best:

# ----------------------------------------------------------------------------
## @brief Use a previously added project module.
macro (basis_use_module MODULE)
  include ("${${MODULE}_USE_FILE}")
  add_definitions(-DHAVE_${PROJECT_PACKAGE_NAME}_${MODULE})
endmacro ()
schuhschuh commented 8 years ago

This requires the basis_add_module function to become a macro that includes the module <MODULE>Config.cmake file.