Configure examples after writing VTKmConfig.cmake

The examples configuration now behave like external projects and use
find_package to configure themselves. As such that file should be built
before we try to configure the examples.
This commit is contained in:
Kenneth Moreland 2016-08-23 16:04:58 -06:00
parent 866c617cbf
commit ab528b8ec9

@ -229,12 +229,6 @@ if (VTKm_BUILD_DOCUMENTATION)
vtkm_build_documentation()
endif()
#-----------------------------------------------------------------------------
# Build examples
if(VTKm_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(VTKm_BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
# Ready files for find_package
include(CMakePackageConfigHelpers)
@ -340,3 +334,9 @@ set(CPACK_PACKAGE_FILE_NAME "VTKm-${VTKm_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE ${VTKm_SOURCE_DIR}/LICENSE.txt)
set(CPACK_RESOURCE_FILE_README ${VTKm_SOURCE_DIR}/README.md)
include(CPack)
#-----------------------------------------------------------------------------
# Build examples
if(VTKm_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(VTKm_BUILD_EXAMPLES)