Hello, I am trying to use the following syntax: find_package (xyz REQUIRED xyz1 xyz2) using a config file, i.e. NOT Findxyz.cmake.
I have a file named xyz-config.cmake that contains some code to check if the required components are available or not (based on how xyz was compiled). Ideally I would like the find_package command to set xyz_FOUND to false if: - xyz-config.cmake file is not found (that's working by default) OR - xyz-config.cmake file is found BUT one or more component is missing In my xyz-config.cmake, I tried: - set (xyz_FOUND FALSE) # overall package not found as required - set (xyz2_FOUND FALSE) # component not found, hoping find_package would compare this to the list xyz_FIND_COMPONENTS But in all cases, it seems that find_package resets xyz_FOUND to 1 as long as the file xyz-config.cmake is found. Is there a way to set xyz_FOUND to 0 within xyz-config.cmake? Anton _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake