On 09/20/2012 12:20 PM, Alexander Neundorf wrote: > if(NOT TARGET Foo) > if(CMAKE_FIND_PACKAGE_NAME) > set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
What happens if other imported targets have already been defined? Then the targets file will have been partially loaded. > set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE > "The required target Foo does not exist !") > else() > message(STATUS > "Warning: the required target Foo does not exist !") > endif() > endif() > > > or SEND_ERROR or FATAL_ERROR ? I think FATAL_ERROR. It is always easier to lessen this later. -Brad -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers