UsePackage.cmake 818 B

12345678910111213141516171819202122232425262728
  1. # This file is designed to be included in a top level CMakeLists.txt like so:
  2. #
  3. # include(path/to/here/UsePackage.cmake)
  4. #
  5. # It will add to the module path all subdirectories with a FindXXX.cmake file
  6. # Do everything inside a function so as not to clash with any existing variables
  7. function(AddDirsToModulePath)
  8. get_filename_component(CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
  9. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
  10. ${CURRENT_DIR}/ISP_test
  11. #${CURRENT_DIR}/ISP_Demo
  12. ${CURRENT_DIR}/stf_isp_ctrl
  13. ${CURRENT_DIR}/stf_isp_test
  14. PARENT_SCOPE
  15. )
  16. endfunction()
  17. if(DEBUG_MODULES)
  18. message("CMAKE_MODULE_PATH before: ${CMAKE_MODULE_PATH}")
  19. endif()
  20. AddDirsToModulePath()
  21. if(DEBUG_MODULES)
  22. message("CMAKE_MODULE_PATH after: ${CMAKE_MODULE_PATH}")
  23. endif()