diff --git a/zxing.cmake b/zxing.cmake index 99f908a2..2a958e32 100644 --- a/zxing.cmake +++ b/zxing.cmake @@ -1,25 +1,7 @@ macro(zxing_add_package_stb) - unset (STB_FOUND CACHE) - - if (ZXING_DEPENDENCIES STREQUAL "AUTO") - find_package(PkgConfig) - pkg_check_modules (STB IMPORTED_TARGET stb) - elseif (ZXING_DEPENDENCIES STREQUAL "LOCAL") - find_package(PkgConfig REQUIRED) - pkg_check_modules (STB REQUIRED IMPORTED_TARGET stb) - endif() - - if (NOT STB_FOUND) - include(FetchContent) - FetchContent_Declare (stb - GIT_REPOSITORY https://github.com/nothings/stb.git) - FetchContent_MakeAvailable (stb) - add_library(stb::stb INTERFACE IMPORTED) - target_include_directories(stb::stb INTERFACE ${stb_SOURCE_DIR}) - else() - add_library(stb::stb ALIAS PkgConfig::STB) - endif() + add_library(stb::stb INTERFACE IMPORTED) + target_include_directories(stb::stb INTERFACE /usr/include/stb) endmacro() macro(zxing_add_package name depname git_repo git_rev)