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