Skip to content

Commit

Permalink
Remove checking for exiftool at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos authored and TurboGit committed Apr 29, 2024
1 parent 142753b commit f8000c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,6 @@ if(USE_XMLLINT)
endif(${Xmllint_BIN} STREQUAL "Xmllint_BIN-NOTFOUND")
endif(USE_XMLLINT)

find_program(exiftool_BIN exiftool)
if(${exiftool_BIN} STREQUAL "exiftool_BIN-NOTFOUND")
message(STATUS "Missing exiftool")
set(HAVE_EXIFTOOL 0)
else()
message(STATUS "Found exiftool")
set(HAVE_EXIFTOOL 1)
endif()

# done with looking for programs
message(STATUS "All external programs found")

Expand Down
6 changes: 1 addition & 5 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ if (BUILD_NOISE_TOOLS)
add_subdirectory(noise)
endif()

set(TOOLS common.sh purge_from_cache.sh purge_non_existing_images.sh purge_unused_tags.sh)
set(TOOLS common.sh extract_wb_from_images.sh purge_from_cache.sh purge_non_existing_images.sh purge_unused_tags.sh)
set(TOOLSWIN purge_nonexistent_images.bat)

if ((NOT WIN32) OR BUILD_MSYS2_INSTALL)

if(HAVE_EXIFTOOL)
set(TOOLS ${TOOLS} extract_wb_from_images.sh)
endif()

install(PROGRAMS ${TOOLS} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/darktable/tools)

else()
Expand Down
7 changes: 7 additions & 0 deletions tools/extract_wb_from_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

commandline="$0 $*"

# check for exiftool
_etpath="$(which exiftool)"
if [ ! -f "$_etpath" -o ! -x "$_etpath" ] ; then
echo "error: 'exiftool' not found, please ensure it is installed and added to path."
exit 1
fi

# handle command line arguments
option="$1"
if [ "${option}" = "-h" ] || [ "${option}" = "--help" ]; then
Expand Down

0 comments on commit f8000c1

Please sign in to comment.