c++visual-studio-codecmakelibzip

Installing libzippp library with cmake not working


Trying to install libzippp library in this project is not working for some reason, here is my project's CMakeLists.txt:

CMakeLists.txt

cmake_minimum_required(VERSION 2.8)
project(startProject)
set(Leptonica_DIR /Users/alejandrocamba/Documents/leptonica/build)

find_package(OpenCV REQUIRED)
find_package(Leptonica REQUIRED)
find_package(Tesseract REQUIRED)
find_package(libzippp 3.0 REQUIRED)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${Leptonica_INCLUDE_DIRS})
include_directories(${Tesseract_INCLUDE_DIRS})

add_executable(startProject main.cpp)
target_link_libraries(startProject libzipp::libzipp)
target_link_libraries(startProject ${OpenCV_LIBS})
target_link_libraries(startProject ${Tesseract_LIBRARIES})

I'm getting the error:

ld: library not found for -llibzipp::libzipp

I have followed the instructions and i cloned the repository and successfully installed it, so if i do make install i get:

enter image description here

But i can't seem to find a way to use it on my project, i need help to make get it working on my project!


Solution

  • Need more p: the proper target name for link with is libzippp::libzippp.

    The project's README wrongly suggests to use libzipp::libzipp.