Hello, CMake Team.
Based on the statistical results, it appears that most of the CMake’s built-in Find modules create Imported Targets after the find_package_handle_standard_args()
call in Find modules.
-
Before
find_package_handle_standard_args()
call:- CMake’s FindDoxygen.cmake
- VTK’s FindFFMPEG.cmake
-
After
find_package_handle_standard_args()
call:- CMake’s FindGTest.cmake
- CMake’s FindOpenGL.cmake
- CMake’s FindGLEW.cmake
- CMake’s FindGDAL.cmake
- CMake’s FindOpenSSL.cmake
- CMake’s FindZLIB.cmake
- CMake’s FindGLUT.cmake
- VTK’s FindEigen3.cmake
- VTK’s Findutf8cpp.cmake
I’m curious about what are the benefits of this practice?
And is it generally recommended to create Imported Targets after the find_package_handle_standard_args()
call in Find modules?