summaryrefslogtreecommitdiffstats
path: root/cmake/FindSlog2.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-04-28 17:33:29 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-04-29 23:08:32 +0200
commit062b50abff6a3cb2319ade41dddf76caa36f27e3 (patch)
tree7a0ec6ab28500b2a84d6edcc240d9bc6a309549d /cmake/FindSlog2.cmake
parent317cfb677464a9610e4b46971e508b90f59b90f6 (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/FindSlog2.cmake')
-rw-r--r--cmake/FindSlog2.cmake8
1 files changed, 3 insertions, 5 deletions
diff --git a/cmake/FindSlog2.cmake b/cmake/FindSlog2.cmake
index dfb6635a39..807ab6b12a 100644
--- a/cmake/FindSlog2.cmake
+++ b/cmake/FindSlog2.cmake
@@ -11,9 +11,7 @@ find_package_handle_standard_args(Slog2 DEFAULT_MSG Slog2_INCLUDE_DIR Slog2_LIBR
mark_as_advanced(Slog2_INCLUDE_DIR Slog2_LIBRARY)
if(Slog2_FOUND)
- add_library(__Slog2 INTERFACE IMPORTED)
- target_link_libraries(__Slog2 INTERFACE ${Slog2_LIBRARY})
- target_include_directories(__Slog2 INTERFACE ${Slog2_INCLUDE_DIR})
-
- add_library(Slog2::Slog2 ALIAS __Slog2)
+ add_library(Slog2::Slog2 INTERFACE IMPORTED)
+ target_link_libraries(Slog2::Slog2 INTERFACE ${Slog2_LIBRARY})
+ target_include_directories(Slog2::Slog2 INTERFACE ${Slog2_INCLUDE_DIR})
endif()