Refer to Find_package
The command find_package
has two modes:
- Module mode
- Config mode
Module mode
This command finds Find<package>.cmake
file located withing our project.
CMakeLists.txt
cmake/FindFoo.cmake
cmake/FindBoo.cmake
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
find_package(Foo REQUIRED) # FOO_INCLUDE_DIR, FOO_LIBRARIES
find_package(Boo REQUIRED) # BOO_INCLUDE_DIR, BOO_LIBRARIES
....
Top comments (0)