Skip to content

Commit

Permalink
Merge branch 'issue_7' - fix for issues #7, #8 & #67
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicer86 committed May 26, 2015
2 parents 9e781c3 + 23955dd commit 669ec14
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 1,540 deletions.
10 changes: 2 additions & 8 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ For build instructions see build.txt file in 'docs' directory.

External libraries and tools used by Photo Broom:
* Qt5 for gui.
* OpenSSL or Nettle is used for cryptographic hash functions.
* EasyExif or Exiv2 for exif access.
* hash-library is used for sha functions (http://create.stephan-brumme.com/hash-library/)
* EasyExif for exif access.
* OpenMP (when available).
* Boost.
* GMock and GTest

Licenses of external tools and libraries are available under links below, and in "docs" directory
http://www.boost.org/users/license.html
https://www.openssl.org/source/license.html
http://www.lysator.liu.se/~nisse/nettle/nettle.html#Copyright
http://www.exiv2.org/download.html#license
7 changes: 7 additions & 0 deletions cmake/3rd_party/hashlibrary.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

function(addHashLibrary)

add_library(hashlibrary STATIC ${CMAKE_SOURCE_DIR}/3rd_party/hash-library/sha256.cpp)
set_target_properties(hashlibrary PROPERTIES POSITION_INDEPENDENT_CODE ON)

endfunction(addHashLibrary)
34 changes: 0 additions & 34 deletions cmake/3rd_party/nettle.cmake

This file was deleted.

15 changes: 9 additions & 6 deletions cmake/FindEasyExif.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@

if(EXISTS ${CMAKE_SOURCE_DIR}/3rd_party/easyexif)

include(${PROJECT_SOURCE_DIR}/cmake/3rd_party/easyexif.cmake)
addEasyExif()
include(${PROJECT_SOURCE_DIR}/cmake/3rd_party/easyexif.cmake)
addEasyExif()

set(EASYEXIF_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rd_party/)
set(EASYEXIF_LIBRARY easyexif)

set(EASYEXIF_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rd_party/)
set(EASYEXIF_LIBRARY easyexif)
else()
find_path(EASYEXIF_INCLUDE_DIR easyexif/exif.h)
find_library(EASYEXIF_LIBRARY NAMES easyexif)

find_path(EASYEXIF_INCLUDE_DIR easyexif/exif.h)
find_library(EASYEXIF_LIBRARY NAMES easyexif)

endif()

set(EASYEXIF_LIBRARIES ${EASYEXIF_LIBRARY} )
Expand Down
25 changes: 25 additions & 0 deletions cmake/FindHashLibrary.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

#rules for finding HashLibrary

if(EXISTS ${CMAKE_SOURCE_DIR}/3rd_party/hash-library)

include(${PROJECT_SOURCE_DIR}/cmake/3rd_party/hashlibrary.cmake)
addHashLibrary()

set(HASHLIBRARY_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rd_party/)
set(HASHLIBRARY_LIBRARY hashlibrary)

else()

find_path(HASHLIBRARY_INCLUDE_DIR hash-library/sha256.h)
find_library(HASHLIBRARY_LIBRARY NAMES hashlibrary)

endif()

set(HASHLIBRARY_LIBRARIES ${HASHLIBRARY_LIBRARY} )
set(HASHLIBRARY_INCLUDE_DIRS ${HASHLIBRARY_INCLUDE_DIR} )

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HashLibrary DEFAULT_MSG HASHLIBRARY_LIBRARY HASHLIBRARY_INCLUDE_DIR)

mark_as_advanced(HASHLIBRARY_INCLUDE_DIR HASHLIBRARY_LIBRARY)
14 changes: 0 additions & 14 deletions cmake/FindNettle.cmake

This file was deleted.

36 changes: 0 additions & 36 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,6 @@ function(addTestTarget target)

endfunction(addTestTarget)


macro(find_exif_package)

find_package(Exiv2)

if(EXIV2_FOUND)
set(EXIF_INCLUDE_DIR ${EXIV2_INCLUDE_DIRS})
set(EXIF_LIBRARIES ${EXIV2_LIBRARIES})
else()
find_package(EasyExif REQUIRED)

set(EXIF_INCLUDE_DIR ${EASYEXIF_INCLUDE_DIRS})
set(EXIF_LIBRARIES ${EASYEXIF_LIBRARIES})
endif()

endmacro(find_exif_package)


macro(find_cryptographic_package)

find_package(OpenSSL)

if(OPENSSL_FOUND)
set(CRYPTOGRAPHIC_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
set(CRYPTOGRAPHIC_LIBRARIES ${OPENSSL_LIBRARIES})
install(FILES ${CMAKE_SOURCE_DIR}/docs/install/OpenSSL.txt DESTINATION ${PATH_DOCS})
else()
find_package(Nettle REQUIRED)

set(CRYPTOGRAPHIC_INCLUDE_DIR ${NETTLE_INCLUDE_DIRS})
set(CRYPTOGRAPHIC_LIBRARIES ${NETTLE_LIBRARIES})
endif()

endmacro(find_cryptographic_package)


# will setup:
# ${lib}_srcs - to list of all library sources
# ${lib}_link_libraries - to all necessary link libraries
Expand Down
11 changes: 5 additions & 6 deletions docs/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
Required tools and libraries:
- cmake - version 3.0 or later
- Qt5 - version 5.4 or higher
- OpenSSL or Nettle
- Exiv2 of easyexif*
- Boost
- hash-library*
- easyexif*
- OpenMP (optional)
- OpenLibrary

* PhotoBroom at configuration phase will additionaly search for EasyExif in (TOP_SOURCE_DIR)/3rd_party/easyexif.
* PhotoBroom at configuration phase will additionaly search for EasyExif and hash-library in (TOP_SOURCE_DIR)/3rd_party/.
So if it is not installed in your system you may:
- cd photo_broom_sources
- mkdir 3rd_party
- git clone https://github.com/mayanklahiri/easyexif.git

or select proper checkbox in cmake-gui tool.
- git clone http://create.stephan-brumme.com/hash-library/.git

Tested compilers:
1. gcc (Linux and Windows)
Expand All @@ -23,6 +21,7 @@ Tested compilers:

2. clang (Linux)

VisualStudio is not supported due to missing support for c++11/14.

PhotoBroom cannot be run from compilation dir without installing.
On Linux it will search for plugins in destination (installation) dir.
Expand Down
Loading

0 comments on commit 669ec14

Please sign in to comment.