Blame SOURCES/0064-cmake-Rename-xmp-to-exiv2-xmp-to-avoid-name-conflict.patch

bab77a
From 89509d7a3915ba474cbc3f8c85ab9bec4954ceda Mon Sep 17 00:00:00 2001
bab77a
From: Andreas Schneider <asn@cryptomilk.org>
bab77a
Date: Wed, 2 Jan 2019 10:38:22 +0100
bab77a
Subject: [PATCH 64/70] cmake: Rename xmp to exiv2-xmp to avoid name conflicts
bab77a
bab77a
There is already a libxmp file by the xmp project on https://xmp.sf.net.
bab77a
To avoid issues prefix with exiv2.
bab77a
bab77a
Fixes #624
bab77a
bab77a
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
bab77a
---
bab77a
 src/CMakeLists.txt    |  2 +-
bab77a
 xmpsdk/CMakeLists.txt | 14 +++++++-------
bab77a
 2 files changed, 8 insertions(+), 8 deletions(-)
bab77a
bab77a
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
bab77a
index adb285b1..2aeae733 100644
bab77a
--- a/src/CMakeLists.txt
bab77a
+++ b/src/CMakeLists.txt
bab77a
@@ -147,7 +147,7 @@ target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
bab77a
 target_include_directories(exiv2lib PRIVATE ${ZLIB_INCLUDE_DIR})
bab77a
 
bab77a
 if (EXIV2_ENABLE_XMP)
bab77a
-    target_link_libraries(exiv2lib PUBLIC xmp)
bab77a
+    target_link_libraries(exiv2lib PUBLIC exiv2-xmp)
bab77a
 elseif(EXIV2_ENABLE_EXTERNAL_XMP)
bab77a
     target_link_libraries(exiv2lib PUBLIC ${XMPSDK_LIBRARY})
bab77a
     target_include_directories(exiv2lib PUBLIC ${XMPSDK_INCLUDE_DIR})
bab77a
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
bab77a
index a4c1fe6c..fa521043 100644
bab77a
--- a/xmpsdk/CMakeLists.txt
bab77a
+++ b/xmpsdk/CMakeLists.txt
bab77a
@@ -1,4 +1,4 @@
bab77a
-add_library(xmp STATIC
bab77a
+add_library(exiv2-xmp STATIC
bab77a
     src/ExpatAdapter.cpp
bab77a
     src/MD5.cpp
bab77a
     src/ParseRDF.cpp
bab77a
@@ -26,12 +26,12 @@ add_library(xmp STATIC
bab77a
     include/XMP_Version.h
bab77a
 )
bab77a
 
bab77a
-target_link_libraries(xmp 
bab77a
+target_link_libraries(exiv2-xmp
bab77a
     PRIVATE 
bab77a
         ${EXPAT_LIBRARY}
bab77a
 )
bab77a
 
bab77a
-target_include_directories(xmp
bab77a
+target_include_directories(exiv2-xmp
bab77a
     PUBLIC 
bab77a
         $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
bab77a
     PRIVATE 
bab77a
@@ -39,20 +39,20 @@ target_include_directories(xmp
bab77a
 )
bab77a
 
bab77a
 if (MSVC)
bab77a
-    target_compile_definitions(xmp PRIVATE XML_STATIC)
bab77a
+    target_compile_definitions(exiv2-xmp PRIVATE XML_STATIC)
bab77a
 endif()
bab77a
 
bab77a
 check_include_file( "stdint.h"  EXV_HAVE_STDINT_H )
bab77a
 if (EXV_HAVE_STDINT_H)
bab77a
-    target_compile_definitions(xmp PRIVATE EXV_HAVE_STDINT_H)
bab77a
+    target_compile_definitions(exiv2-xmp PRIVATE EXV_HAVE_STDINT_H)
bab77a
 endif()
bab77a
 
bab77a
 if (BUILD_SHARED_LIBS)
bab77a
-    set_property(TARGET xmp PROPERTY POSITION_INDEPENDENT_CODE ON)
bab77a
+    set_property(TARGET exiv2-xmp PROPERTY POSITION_INDEPENDENT_CODE ON)
bab77a
 endif()
bab77a
 
bab77a
 # 1119  Install libxmp.a for use by third party applications (Thanks, Emmanuel)
bab77a
-install(TARGETS xmp EXPORT exiv2Config
bab77a
+install(TARGETS exiv2-xmp EXPORT exiv2Config
bab77a
         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
bab77a
         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
bab77a
 )
bab77a
-- 
bab77a
2.17.2
bab77a