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

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