Skip to content

Commit d4838dd

Browse files
amazingakaikmilos
authored andcommitted
Clear error when Brotli/inih not found for static builds in exiv2Config
1 parent d46b8b5 commit d4838dd

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

cmake/exiv2Config.cmake.in

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ if(NOT @BUILD_SHARED_LIBS@) # if(NOT BUILD_SHARED_LIBS)
99
endif()
1010

1111
if(@EXIV2_ENABLE_BMFF@ AND @EXIV2_ENABLE_BROTLI@) # if(EXIV2_ENABLE_BMFF AND EXIV2_ENABLE_BROTLI)
12-
find_dependency(Brotli REQUIRED)
12+
find_package(Brotli QUIET)
13+
if (NOT Brotli_FOUND)
14+
message(FATAL_ERROR
15+
"Static builds of exiv2 require Brotli. "
16+
"Please provide FindBrotli.cmake on CMAKE_MODULE_PATH "
17+
"or point to the cmake/ dir in the exiv2 source tree.")
18+
endif()
1319
endif()
1420

1521
if(@EXIV2_ENABLE_WEBREADY@) # if(EXIV2_ENABLE_WEBREADY)
@@ -33,7 +39,13 @@ if(NOT @BUILD_SHARED_LIBS@) # if(NOT BUILD_SHARED_LIBS)
3339
endif()
3440

3541
if(@EXIV2_ENABLE_INIH@) # if(EXIV2_ENABLE_INIH)
36-
find_dependency(inih REQUIRED)
42+
find_package(inih QUIET)
43+
if (NOT inih_FOUND)
44+
message(FATAL_ERROR
45+
"Static builds of exiv2 require inih. "
46+
"Please provide FindInih.cmake on CMAKE_MODULE_PATH "
47+
"or point to the cmake/ dir in the exiv2 source tree.")
48+
endif()
3749
endif()
3850

3951
if(NOT "@EXV_HAVE_STD_FORMAT@") # if(NOT EXV_HAVE_STD_FORMAT)

0 commit comments

Comments
 (0)