diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-04-28 17:33:29 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-04-29 23:08:32 +0200 |
commit | 062b50abff6a3cb2319ade41dddf76caa36f27e3 (patch) | |
tree | 7a0ec6ab28500b2a84d6edcc240d9bc6a309549d /cmake/FindWrapRt.cmake | |
parent | 317cfb677464a9610e4b46971e508b90f59b90f6 (diff) |
CMake: Namespace all our IMPORTED targets
CMake IMPORTED targets should be namespaced so that CMake knows that
the name refers to a target and not a file.
Use the existing WrapXXX naming scheme where applicable.
Fixes: QTBUG-83773
Change-Id: I5b0b722c811200c56c260c69e76940a625228769
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/FindWrapRt.cmake')
-rw-r--r-- | cmake/FindWrapRt.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/FindWrapRt.cmake b/cmake/FindWrapRt.cmake index 0e57cadef5..6a138d348f 100644 --- a/cmake/FindWrapRt.cmake +++ b/cmake/FindWrapRt.cmake @@ -1,6 +1,6 @@ # We can't create the same interface imported target multiple times, CMake will complain if we do # that. This can happen if the find_package call is done in multiple different subdirectories. -if(TARGET WrapRt) +if(TARGET WrapRt::WrapRt) set(WrapRt_FOUND ON) return() endif() @@ -30,8 +30,8 @@ cmake_pop_check_state() if(HAVE_GETTIME) set(WrapRt_FOUND ON) - add_library(WrapRt INTERFACE IMPORTED) + add_library(WrapRt::WrapRt INTERFACE IMPORTED) if (LIBRT_FOUND) - target_link_libraries(WrapRt INTERFACE "${LIBRT}") + target_link_libraries(WrapRt::WrapRt INTERFACE "${LIBRT}") endif() endif() |