Commit b4c49fd3 authored by Matthew Woehlke's avatar Matthew Woehlke Committed by David Partyka

add configs for find_package

Add QtTestingConfig.cmake (in both build and install flavors) so a
stand-alone QtTesting build can be used by other projects.
parent e1580e63
......@@ -193,3 +193,23 @@ INSTALL(TARGETS QtTesting
ARCHIVE DESTINATION ${QtTesting_INSTALL_LIB_DIR} COMPONENT Development)
add_subdirectory(Examples)
# Set up the build export configuration
set( QtTesting_EXPORT_FILE "${QtTesting_BINARY_DIR}/QtTestingConfig.cmake" )
configure_file(
"${QtTesting_SOURCE_DIR}/QtTestingConfig.cmake.in"
"${QtTesting_EXPORT_FILE}"
)
# Set up the install export
set( QtTesting_EXPORT_INSTALL_FILE "${QtTesting_BINARY_DIR}/CMakeFiles/QtTestingConfig.cmake" )
configure_file(
"${QtTesting_SOURCE_DIR}/QtTestingConfig-install.cmake.in"
"${QtTesting_EXPORT_INSTALL_FILE}"
@ONLY
)
# Configure the CMake EXPORT file during installation
install( FILES ${QtTesting_BINARY_DIR}/CMakeFiles/QtTestingConfig.cmake
DESTINATION lib/cmake
)
set(QtTesting_INCLUDE_DIRS "@QtTesting_SOURCE_DIR@;@QtTesting_BINARY_DIR@")
set(QtTesting_LIBRARY_DIR "@QtTesting_INSTALL_LIB_DIR@")
set(QtTesting_INCLUDE_DIRS "@QtTesting_SOURCE_DIR@;@QtTesting_BINARY_DIR@")
set(QtTesting_LIBRARY_DIR "@QtTesting_BINARY_DIR@")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment