Commit ba712bd0 authored by Matthew Woehlke's avatar Matthew Woehlke

BUG: Fix installed .cmake.

find_package was unable to find the QtTesting library due to the
installed .cmake having the wrong QtTesting_LIBRARY_DIR ("lib", rather
than the full path). Fix by determining the full path, and writing that
to the installed .cmake instead.
parent fc0d3a4c
......@@ -227,6 +227,13 @@ configure_file(
)
# Set up the install export
IF(IS_ABSOLUTE QtTesting_INSTALL_LIB_DIR)
set(QtTesting_INSTALL_LIB_FULL_DIR "${QtTesting_INSTALL_LIB_DIR}")
ELSE()
set(QtTesting_INSTALL_LIB_FULL_DIR "${CMAKE_INSTALL_PREFIX}/${QtTesting_INSTALL_LIB_DIR}")
get_filename_component(QtTesting_INSTALL_LIB_FULL_DIR "${QtTesting_INSTALL_LIB_FULL_DIR}" ABSOLUTE)
ENDIF()
set( QtTesting_EXPORT_INSTALL_FILE "${QtTesting_BINARY_DIR}/CMakeFiles/QtTestingConfig.cmake" )
configure_file(
"${QtTesting_SOURCE_DIR}/QtTestingConfig-install.cmake.in"
......
set(QtTesting_INCLUDE_DIRS "@QtTesting_SOURCE_DIR@;@QtTesting_BINARY_DIR@")
set(QtTesting_LIBRARY_DIR "@QtTesting_INSTALL_LIB_DIR@")
set(QtTesting_LIBRARY_DIR "@QtTesting_INSTALL_LIB_FULL_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