Navigation Menu

Skip to content

Commit

Permalink
Add EXIV2 cmake variables
Browse files Browse the repository at this point in the history
Forward port from kadas-albireo
  • Loading branch information
manisandro authored and nyalldawson committed Nov 12, 2018
1 parent d0d10f8 commit e0c79c4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -280,6 +280,7 @@ IF(WITH_CORE)
FIND_PACKAGE(Qwt REQUIRED)
ENDIF (WITH_GUI)
FIND_PACKAGE(LibZip REQUIRED)
FIND_PACKAGE(EXIV2 REQUIRED)

FIND_PACKAGE(Sqlite3)
IF (NOT SQLITE3_FOUND)
Expand Down
22 changes: 22 additions & 0 deletions cmake/FindEXIV2.cmake
@@ -0,0 +1,22 @@
# Find EXIV2
# ~~~~~~~~~~
# CMake module to search for EXIV2 library
#
# If it's found it sets EXIV2_FOUND to TRUE
# and following variables are set:
# EXIV2_INCLUDE_DIR
# EXIV2_LIBRARY
#


FIND_PATH(EXIV2_INCLUDE_DIR exiv2/exiv2.hpp /usr/local/include /usr/include)
FIND_LIBRARY(EXIV2_LIBRARY NAMES exiv2 PATHS /usr/local/lib /usr/lib)

IF (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
SET(EXIV2_FOUND TRUE)
MESSAGE(STATUS "Found exiv2: ${EXIV2_LIBRARY}")
ELSE (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
MESSAGE(EXIV2_INCLUDE_DIR=${EXIV2_INCLUDE_DIR})
MESSAGE(EXIV2_LIBRARY=${EXIV2_LIBRARY})
MESSAGE(FATAL_ERROR "Could not find exiv2")
ENDIF (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)

5 comments on commit e0c79c4

@nirvn
Copy link
Contributor

@nirvn nirvn commented on e0c79c4 Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nirvn
Copy link
Contributor

@nirvn nirvn commented on e0c79c4 Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson , okeydokey.

@jef-n
Copy link
Member

@jef-n jef-n commented on e0c79c4 Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nirvn
Copy link
Contributor

@nirvn nirvn commented on e0c79c4 Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n , thanks.

Please sign in to comment.