Coder Social home page Coder Social logo

[OpenCV] about vcpkg HOT 7 CLOSED

NoWineNoLife avatar NoWineNoLife commented on September 27, 2024
[OpenCV]

from vcpkg.

Comments (7)

JonLiu1993 avatar JonLiu1993 commented on September 27, 2024

@NoWineNoLife, sorry I can't reproduce your error:

1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Visual Studio 17 2022" -A x64  -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject1\out\install\x64-Debug"  -DCMAKE_TOOLCHAIN_FILE=F:/test/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\CMakeProject1" 2>&1"
1> Working directory: C:\Users\test\source\repos\CMakeProject1\out\build\x64-Debug
1> [CMake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
1> [CMake] -- The C compiler identification is MSVC 19.39.33523.0
1> [CMake] -- The CXX compiler identification is MSVC 19.39.33523.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Found Protobuf: F:/test/vcpkg/installed/x64-windows/tools/protobuf/protoc.exe (found version "3.21.12.0") 
1> [CMake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
1> [CMake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
1> [CMake] -- Looking for pthread_create in pthreads
1> [CMake] -- Looking for pthread_create in pthreads - not found
1> [CMake] -- Looking for pthread_create in pthread
1> [CMake] -- Looking for pthread_create in pthread - not found
1> [CMake] -- Found Threads: TRUE  
1> [CMake] -- Could NOT find tiff (missing: tiff_DIR)
1> [CMake] -- Found TIFF: optimized;F:/test/vcpkg/installed/x64-windows/lib/tiff.lib;debug;F:/test/vcpkg/installed/x64-windows/debug/lib/tiffd.lib (found version "4.6.0")  
1> [CMake] -- Found HDF5: hdf5::hdf5-shared (found version "1.14.2")  
1> [CMake] -- Found ZLIB: optimized;F:/test/vcpkg/installed/x64-windows/lib/zlib.lib;debug;F:/test/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found suitable version "1.3.1", minimum required is "1")  
1> [CMake] -- Found LibArchive: F:/test/vcpkg/installed/x64-windows/debug/lib/archive.lib (found version "3.7.2") 
1> [CMake] -- Found OpenCV: F:/test/vcpkg/installed/x64-windows (found version "4.8.0") 
1> [CMake] -- Configuring done (19.6s)
1> [CMake] -- Generating done (0.1s)
1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/CMakeProject1/out/build/x64-debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.

CMakeLists:

cmake_minimum_required(VERSION 3.5)

project(test)

find_package(OpenCV CONFIG REQUIRED)

add_executable(test CMakeProject1.cpp)
target_link_libraries(test PRIVATE opencv_ml opencv_dnn opencv_dpm opencv_hdf)

Are you using the latest vcpkg? What is your opcncv version?

from vcpkg.

dg0yt avatar dg0yt commented on September 27, 2024
set(CMAKE_TOOLCHAIN_FILE "D:/develop_kits/vcpkg/scripts/buildsystems/vcpkg.cmake")
project(test LANGUAGES CXX)

set(CMAKE_PREFIX_PATH "D:/develop_kits/vcpkg/installed/x64-windows/share/")

The last line overwrites toolchain configuration (and also potential user input). You may append or prepend if you want. But for vcpkg, it shouldn't be needed at all.

from vcpkg.

NoWineNoLife avatar NoWineNoLife commented on September 27, 2024

Hi, @JonLiu1993 , in my env, the vcpkg version is 2024-03-14-7d353e, the opencv version is 4.8.0

from vcpkg.

NoWineNoLife avatar NoWineNoLife commented on September 27, 2024

@dg0yt Thanks for pointing that out.

from vcpkg.

dg0yt avatar dg0yt commented on September 27, 2024

@dg0yt Thanks for pointing that out.

So is your issue resolved now?

from vcpkg.

NoWineNoLife avatar NoWineNoLife commented on September 27, 2024

@dg0yt unfortunately, no. i downloaded the opencv library from opencv.org and set it manually.

from vcpkg.

dg0yt avatar dg0yt commented on September 27, 2024

So did you try to fix your CMakeLists.txt and start with a fresh build directory? CMake's caching requires to clean the cached variables in some cases,

from vcpkg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.