Skip to content

Commit e0c79c4

Browse files
manisandronyalldawson
authored andcommittedNov 12, 2018
Add EXIV2 cmake variables
Forward port from kadas-albireo
1 parent d0d10f8 commit e0c79c4

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
 

‎CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ IF(WITH_CORE)
280280
FIND_PACKAGE(Qwt REQUIRED)
281281
ENDIF (WITH_GUI)
282282
FIND_PACKAGE(LibZip REQUIRED)
283+
FIND_PACKAGE(EXIV2 REQUIRED)
283284

284285
FIND_PACKAGE(Sqlite3)
285286
IF (NOT SQLITE3_FOUND)

‎cmake/FindEXIV2.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Find EXIV2
2+
# ~~~~~~~~~~
3+
# CMake module to search for EXIV2 library
4+
#
5+
# If it's found it sets EXIV2_FOUND to TRUE
6+
# and following variables are set:
7+
# EXIV2_INCLUDE_DIR
8+
# EXIV2_LIBRARY
9+
#
10+
11+
12+
FIND_PATH(EXIV2_INCLUDE_DIR exiv2/exiv2.hpp /usr/local/include /usr/include)
13+
FIND_LIBRARY(EXIV2_LIBRARY NAMES exiv2 PATHS /usr/local/lib /usr/lib)
14+
15+
IF (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
16+
SET(EXIV2_FOUND TRUE)
17+
MESSAGE(STATUS "Found exiv2: ${EXIV2_LIBRARY}")
18+
ELSE (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
19+
MESSAGE(EXIV2_INCLUDE_DIR=${EXIV2_INCLUDE_DIR})
20+
MESSAGE(EXIV2_LIBRARY=${EXIV2_LIBRARY})
21+
MESSAGE(FATAL_ERROR "Could not find exiv2")
22+
ENDIF (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)

5 commit comments

Comments
 (5)

nirvn commented on Nov 13, 2018

@nirvn
Contributor

@nyalldawson , it'd be good to update INSTALL to add libexiv2-dev dependency.

nyalldawson commented on Nov 13, 2018

@nyalldawson
Collaborator

@nirvn that'll happen automatically when it's next updated

nirvn commented on Nov 13, 2018

@nirvn
Contributor

@nyalldawson , okeydokey.

jef-n commented on Nov 13, 2018

@jef-n
Member

nirvn commented on Nov 13, 2018

@nirvn
Contributor

@jef-n , thanks.

Please sign in to comment.