diff options
Diffstat (limited to 'Tests/QtAutogen/TestMacros.cmake')
-rw-r--r-- | Tests/QtAutogen/TestMacros.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Tests/QtAutogen/TestMacros.cmake b/Tests/QtAutogen/TestMacros.cmake index 9dcf31f..529592e 100644 --- a/Tests/QtAutogen/TestMacros.cmake +++ b/Tests/QtAutogen/TestMacros.cmake @@ -7,8 +7,17 @@ else() endif() list(APPEND Autogen_BUILD_OPTIONS "-DCMAKE_AUTOGEN_VERBOSE=1" - "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" ) +if(Qt${QT_TEST_VERSION}Core_DIR) + get_filename_component(prefix "${Qt${QT_TEST_VERSION}Core_DIR}" DIRECTORY) + get_filename_component(prefix "${prefix}" DIRECTORY) + get_filename_component(prefix "${prefix}" DIRECTORY) + list(APPEND Autogen_BUILD_OPTIONS "-DCMAKE_PREFIX_PATH:STRING=${prefix}") +else() + list(APPEND Autogen_BUILD_OPTIONS + "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" + ) +endif() # XXX(xcode-per-cfg-src): Drop the NO_PER_CONFIG_SOURCES exclusion # when the Xcode generator supports per-config sources. if(CMAKE_GENERATOR STREQUAL "Xcode") |