I'm facing the following problem. I want to build xzing-cpp from source to integrate it with one of my projects - I don't want to install it to (/usr/...).
This is what my CMakeList looks like:
cmake_minimum_required(VERSION 3.0)
project(sample)
set(CMAKE_CXX_STANDARD 20)
set(ZXing_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zxing/build")
find_package(ZXing REQUIRED)
add_executable(sample main.cpp ZXingOpenCV.h)
target_link_libraries(sample ZXing)
But when I do so I get the following error:
CMake Error at dependencies/zxing/build/ZXingConfig.cmake:26 (include):
include could not find requested file:
/home/code/crepo/sample/dependencies/zxing/build/ZXingTargets.cmake
Call Stack (most recent call first):
CMakeLists.txt:11 (find_package)
But why there is no ZXingTargets.cmake file?
I downloaded the source got from the offical repo and did cmake build & make.
What is wrong there, anyone can help?
Thanks