We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6af1ca2 commit b4d3c1bCopy full SHA for b4d3c1b
cmake-init/templates/common/cmake/install-config.cmake
@@ -1,6 +1,14 @@
1
{% if pm %}set({= name =}_FOUND YES)
2
3
-include(CMakeFindDependencyMacro)
+{% end %}foreach(comp IN LISTS {= name =}_FIND_COMPONENTS)
4
+ if(DEFINED "{= name =}_FIND_REQUIRED_${comp}" AND "${{= name =}_FIND_REQUIRED_${comp}}")
5
+ set({= name =}_FOUND NO)
6
+ set({= name =}_NOT_FOUND_MESSAGE "This package has no components")
7
+ return()
8
+ endif()
9
+endforeach()
10
+
11
+{% if pm %}include(CMakeFindDependencyMacro)
12
find_dependency({% if c %}json-c{% else %}fmt{% end %})
13
14
if({= name =}_FOUND)
0 commit comments