summaryrefslogtreecommitdiff
blob: 686b37ff8b60aa4c406dd3516b89ad0a5f6fe054 (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
--- a/CMakeLists.txt	2017-06-07 00:14:25.374608170 +0200
+++ b/CMakeLists.txt	2017-06-07 00:17:00.680483299 +0200
@@ -60,6 +60,7 @@
     OPTION( EXIV2_ENABLE_SSH           "USE Libssh for SshIo"                              ON  )
     SET ( EXIV2_ENABLE_DYNAMIC_RUNTIME OFF )
 ENDIF()
+OPTION( EXIV2_ENABLE_TOOLS         "Build exiv2 executable"                                ON  )
 
 # set include path for FindXXX.cmake files
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
--- a/src/CMakeLists.txt	2017-06-07 00:14:25.368608098 +0200
+++ b/src/CMakeLists.txt	2017-06-07 00:16:06.710831682 +0200
@@ -317,10 +317,12 @@
 
 # ******************************************************************************
 # exiv2 application
-ADD_EXECUTABLE( exiv2 ${EXIV2_SRC}  ${EXIV2_HDR} )
+IF(EXIV2_ENABLE_TOOLS)
+    ADD_EXECUTABLE( exiv2 ${EXIV2_SRC}  ${EXIV2_HDR} )
 target_compile_definitions(exiv2 PRIVATE EXV_LOCALEDIR="${CMAKE_INSTALL_LOCALEDIR}" )
-TARGET_LINK_LIBRARIES( exiv2 exiv2lib ${LIBINTL_LIBRARIES} )
-INSTALL( TARGETS exiv2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+    TARGET_LINK_LIBRARIES( exiv2 exiv2lib ${LIBINTL_LIBRARIES} )
+    INSTALL( TARGETS exiv2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ENDIF( EXIV2_ENABLE_TOOLS )
 
 # ******************************************************************************
 # connection test application