Tests: Fix Qt5Autogen test on Xcode

Fix the `mocPlugin` project to provide `mocPlugin.xcodeproj` instead of
`Project.xcodeproj` so that the `try_compile` project name matches.
Also search in the `Debug` subdirectory of the `try_compile` build tree
for the resulting binaries, to work with multi-config generators.
This commit is contained in:
Brad King 2017-05-30 10:08:44 -04:00
parent bd9ec9d1d0
commit f34f7815e3
2 changed files with 5 additions and 4 deletions

View File

@ -304,10 +304,10 @@ if (NOT QT_TEST_VERSION STREQUAL 4)
set(timeformat "%Y%j%H%M%S")
set(mocPlugSrcDir "${CMAKE_CURRENT_SOURCE_DIR}/mocPlugin")
set(mocPlugBinDir "${CMAKE_CURRENT_BINARY_DIR}/mocPlugin")
find_library(plAFile "PlugA" PATHS "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plBFile "PlugB" PATHS "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plCFile "PlugC" PATHS "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plDFile "PlugD" PATHS "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plAFile "PlugA" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plBFile "PlugB" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plCFile "PlugC" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH)
find_library(plDFile "PlugD" PATHS "${mocPlugBinDir}/Debug" "${mocPlugBinDir}" NO_DEFAULT_PATH)
file(TIMESTAMP "${plAFile}" plABefore "${timeformat}")
file(TIMESTAMP "${plBFile}" plBBefore "${timeformat}")

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.8)
project(mocPlugin CXX)
set(CMAKE_AUTOMOC_DEPEND_FILTERS
"A_CUSTOM_MACRO"