[libxml2] Add CMake alias targets for embedded projects



commit a1cac3bbe48c9f3f74da61128a8f5b27bae247e4
Author: Markus Rickert <rickert fortiss org>
Date:   Sat May 22 14:51:26 2021 +0200

    Add CMake alias targets for embedded projects

 CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a437717b..e8bf2429 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -414,6 +414,7 @@ if(LIBXML2_WITH_TRIO)
 endif()
 
 add_library(LibXml2 ${LIBXML2_HDRS} ${LIBXML2_SRCS})
+add_library(LibXml2::LibXml2 ALIAS LibXml2)
 
 if(NOT BUILD_SHARED_LIBS)
        target_compile_definitions(LibXml2 INTERFACE LIBXML_STATIC)
@@ -537,6 +538,7 @@ if(LIBXML2_WITH_PROGRAMS)
        )
        foreach(PROGRAM ${PROGRAMS})
                add_executable(${PROGRAM} ${PROGRAM}.c)
+               add_executable(LibXml2::${PROGRAM} ALIAS ${PROGRAM})
                target_link_libraries(${PROGRAM} LibXml2)
                if(HAVE_LIBHISTORY)
                        target_link_libraries(${PROGRAM} history)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]