summaryrefslogtreecommitdiff
path: root/media-gfx/exiv2/files/exiv2-0.26_p20171013-cmake.patch
blob: c10f125415b2068e68e78463dcbd6c3e12c3429a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 57883ee664260f5a1b382575e7477ad34c86ce7d Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Fri, 13 Oct 2017 18:54:11 +0200
Subject: [PATCH] Fix build with EXIV2_BUILD_EXIV2_COMMAND=OFF

---
 src/CMakeLists.txt | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fe49a0a6..f75cbf1b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -291,21 +291,28 @@ if(EXIV2_BUILD_EXIV2_COMMAND)
     if ( BUILD_SHARED_LIBS )
         target_compile_definitions(exiv2 PRIVATE EXV_HAVE_DLL )
     endif()
+    # modify source lists to suit environment
+
+    # TODO This should not be needed here! we need to fix the previous TODO
+    target_include_directories(exiv2 PRIVATE ${CMAKE_SOURCE_DIR}/include/)
+
+    if(NOT EXV_HAVE_TIMEGM )
+        target_sources(exiv2    PRIVATE localtime.c)
+    endif()
+
+    if (MSVC)
+        target_sources(exiv2    PRIVATE getopt_win32.c)
+    endif()
     install(TARGETS exiv2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 endif()
 
-# TODO This should not be needed here! we need to fix the previous TODO
-target_include_directories(exiv2 PRIVATE ${CMAKE_SOURCE_DIR}/include/)
-
 # modify source lists to suit environment
 if(NOT EXV_HAVE_TIMEGM )
     target_sources(exiv2lib PRIVATE localtime.c)
-    target_sources(exiv2    PRIVATE localtime.c)
 endif()
 
 if (MSVC)
     target_sources(exiv2lib PRIVATE getopt_win32.c)
-    target_sources(exiv2    PRIVATE getopt_win32.c)
 endif()
 
 # ******************************************************************************