diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-08-30 11:53:14 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-08-31 09:43:53 +0200 |
commit | 53e99bd479f74c5399664d26e35e392875da8fb5 (patch) | |
tree | f3f0b0a1acde16fbdb75c14fc0812f7d90b6de8e /cmake | |
parent | 7b0a058bbad6adcd9a45a3d7159e73e05c7d894c (diff) |
Use generator expression to get moc path
We used IMPORTED_LOCATION for getting moc path,
however this will not work in case of top level builds,
since moc is not "imported", we can not use LOCATION
due to https://cmake.org/cmake/help/latest/policy/CMP0026.html
Use generator expression to set the moc path for gn.
Clean up RSP_PREFIX leftover from previous gn version.
Note QtPdf does not even need moc setup since we just need
pdfium library.
Pick-to: 6.2
Task-number: QTBUG-95590
Change-Id: Ief3dca96f65e198e9693293316b1a90007c56355
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Functions.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index b7c386fc3..68c7657a3 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -82,7 +82,8 @@ function(create_cxx_config cmakeTarget arch configFileName) set(GN_INCLUDES $<TARGET_PROPERTY:INCLUDE_DIRECTORIES>)\n\ set(GN_DEFINES $<TARGET_PROPERTY:COMPILE_DEFINITIONS>)\n\ set(GN_LINK_OPTIONS $<TARGET_PROPERTY:LINK_OPTIONS>)\n\ - set(GN_CXX_COMPILE_OPTIONS $<TARGET_PROPERTY:COMPILE_OPTIONS>)" + set(GN_CXX_COMPILE_OPTIONS $<TARGET_PROPERTY:COMPILE_OPTIONS>)\n\ + set(GN_MOC_PATH $<TARGET_FILE:Qt::moc>)" # set(GN_LIBS $<TARGET_PROPERTY:LINK_LIBRARIES>) CONDITION $<COMPILE_LANGUAGE:CXX> TARGET ${cmakeTarget} |