File tree Expand file tree Collapse file tree 2 files changed +21
-16
lines changed Expand file tree Collapse file tree 2 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -148,19 +148,24 @@ option(GRK_BUILD_CODEC "Build the CODEC executables" ON)
148148option (GRK_BUILD_PLUGIN_LOADER "Enable loading of T1 plugin" OFF )
149149mark_as_advanced (GRK_BUILD_PLUGIN_LOADER)
150150
151- find_package (PerlLibs)
152- if (PERLLIBS_FOUND)
153- message (STATUS "Perl libraries found" )
154- execute_process (COMMAND ${PERL_EXECUTABLE} -MImage::ExifTool -e ""
155- ERROR_QUIET RESULT_VARIABLE status )
156- if (NOT status )
157- message (STATUS "ExifTool Perl module found" )
158- set (GROK_HAVE_EXIFTOOL define)
159- else ()
160- message (STATUS "ExifTool Perl module not found" )
161- endif ()
162- endif (PERLLIBS_FOUND)
163-
151+ # Add an option to enable or disable the ExifTool check
152+ option (GRK_ENABLE_EXIFTOOL "Enable detection of ExifTool Perl module" ON )
153+
154+ # Check for Perl library
155+ if (GRK_ENABLE_EXIFTOOL)
156+ find_package (PerlLibs)
157+ if (PERLLIBS_FOUND)
158+ message (STATUS "Perl libraries found" )
159+ execute_process (COMMAND ${PERL_EXECUTABLE} -MImage::ExifTool -e ""
160+ ERROR_QUIET RESULT_VARIABLE status )
161+ if (NOT status )
162+ message (STATUS "ExifTool Perl module found" )
163+ set (GROK_HAVE_EXIFTOOL define)
164+ else ()
165+ message (STATUS "ExifTool Perl module not found" )
166+ endif ()
167+ endif (PERLLIBS_FOUND)
168+ endif ()
164169
165170add_subdirectory (src/lib/core)
166171# Option to build SWIG bindings for grok_core (default OFF)
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ to `glibc`. For a purely static build, the library can be built
112112on [ Alpine Linux] ( https://www.alpinelinux.org/ ) . Alpine uses
113113[ musl libc] ( https://musl.libc.org/ ) , which can be linked to statically.
114114
115- Note: ` cmake ` must also be configured with ` -DCMAKE_EXE_LINKER_FLAGS="-static" ` .
115+ ` cmake ` must also be configured with ` -DBUILD_SHARED_LIBS:bool=off -DGRK_ENABLE_EXIFTOOL:bool=off -DCMAKE_EXE_LINKER_FLAGS="-static"` .
116116
117117### Fedora
118118
@@ -122,8 +122,8 @@ from the build folder, then
122122must be added to the ` .bashrc ` file. Note that the build binary folder is
123123entered before the system binary folder, so that build shared libraries
124124are given priority when loading at run time.
125- 1 . for a static build, the following library must be installed:
126- ` sudo dnf install libstdc++-static `
125+ 1 . for a static build, the following libraries must be installed:
126+ ` sudo dnf install libstdc++-static glibc-static `
127127
128128### Debug/Release
129129
You can’t perform that action at this time.
0 commit comments