vcpkg using local install of boost instead of vcpkg install - c++

I am trying to build with cmake and vcpkg. I installed some packages including boost (iostreams, serialization and system) with vcpkg. Additionally, I have a local install of boost without these components. When i try to build, I get the following error:
C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2344 (find_package_handle_standard_args)
C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:770 (include)
CMakeLists.txt:168 (FIND_PACKAGE)
The CMakeCache.txt has the following line:
//Path to a file.
Boost_INCLUDE_DIR:PATH=C:/boost/boost_1_66_0
which is the path to my local install. How can I get cmake to use the boost install from vcpkg?
EDIT:
To anoyone coming to this question in the future, I came across this PR where they apparently fixed the problem. However, I still get the same error when installing OpenMVS.

Related

"TBB library cannot be found" CMake on MacOS

I'm trying to build PrusaSlicer from source on Mac. I don't have any experience with CMake. I'm following the instructions given here.
Every time I try to build dependencies. This command cmake ..gives me errors. Earlier it was saying "Boost cannot be found." I fixed that by installing boost with brew. Now it's stuck on TBB.
OS X SDK Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
OS X Deployment Target: (default)
-- Boost::boost exists
CMake Error at /opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
TBB library cannot be found. Consider set TBBROOT environment variable.
(missing: TBB_LIBRARIES) (found version "2020.3")
Call Stack (most recent call first):
/opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindTBB.cmake.in:286 (find_package_handle_standard_args)
cmake/modules/FindTBB.cmake:29 (include)
CMakeLists.txt:384 (find_package)
-- Configuring incomplete, errors occurred!
I have installed TBB. If you would notice even this error has the version listed.
Things I have tried:
Installing boost, cmake and tbb via brew.
Installing boost, cmake and tbb via macports.
Try the following
cmake .. -DTBB_LIBRARYDIR=/opt/intel/tbb/lib/intel64/gcc4.8 -DTBB_INCLUDEDIR=/opt/intel/tbb/include
Note the subtle differences in the CMake var names and the path to include, not include/tbb.Let me know how that goes

Issues installing/building the CGAL Library with vcpkg manager

To start, I am new to C++ and its package managers so there is a good chance that I just did something dumb.
Note: I am on a 64bit Windows 10 system, I have Clion and visual studio 2019 installed and want to start using CGAL's library. To do so, I simply followed the steps on their website to install the things that I need:
mkdir vcpkgclone
cd vcpkgclone
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install yasm-tool:x86-windows
vcpkg install cgal:x64-windows
However, I get the following error:
CMake Error at scripts/cmake/vcpkg_fail_port_install.cmake:97 (message):
The yasm-tool port is only intended to be built for x86 Windows
Architecture 'x64' not supported by yasm-tool!
Call Stack (most recent call first):
ports/yasm-tool/portfile.cmake:1 (vcpkg_fail_port_install)
scripts/ports.cmake:142 (include)
Error: Building package yasm-tool:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: yasm-tool:x64-windows
Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e
Additionally, attach any relevant sections from the log files above.
Your assistance in solving this problem would be greatly appreciated

How to build flann in windows 10 from source?

I was trying to build flann from source in Windows-10 using cmake. During the installation process it says it cannot find liblz4.
I tried two method :
1) So I downloaded the prebuild lz4 from here (https://github.com/lz4/lz4/releases) and placed the C:\XXXX\Downloads\lz4_v1_9_1_win64\dll to my env path.
2) I used vcpkg to install lz4 first. Then did
C:\source\flann\build> cmake .. -DCMAKE_TOOLCHAIN_FILE=C:\XXXXXX\source\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 15 2017 Win64".
None of the above two method worked. I still get cannot find liblz4 error.
-- Found PkgConfig: C:/XXXXXX/Downloads/cmake-3.13.3-win64-x64/bin/pkg-config.exe (found version "0.26") -- Checking for module 'liblz4' -- No package 'liblz4' found CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:452 (message): A required package was not found Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.13/Modules/FindPkgConfig.cmake:622 (_pkg_check_modules_internal) CMakeLists.txt:150 (pkg_check_modules) -- Configuring incomplete, errors occurred! See also "C:/XXXXXXX/source/flann/build/CMakeFiles/CMakeOutput.log".
Did you try to do as follows?(https://github.com/lz4/lz4)
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install lz4

Installing the SFGUI with Cmake

I've been trying to install SFGUI library with Cmake tool with instructions given here: SFGUI Install Tutorial . Still got many problems in major with Cmake, which couldn't find few files from SFGUI directory, for example
CMake Error: The source "D:/SFGUI-master/CMakeLists.txt" does not match the source "D:/SFGUI-0.3.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Restarting didn't help. Could anyone write how to install this in simple steps? Regards.
cmake is telling you that the files it has generated in it's cache from a previous run don't match the source files you are currently using. I would imagine that you ran cmake, then switched git branches or tags and tried to run cmake again. You can just rm -r CMakeFiles in your build directory to remove the cache. Then you should be able to run cmake again without errors.
Thanks! It moved a little bit, but stopped actually at error:
CMake Error at cmake/Modules/FindSFML.cmake:306 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/admin/Documents/Visual Studio 2015/Projects/sfml1/sfml1/CMakeFiles/CMakeOutput.log".
To be honest, I will write down steps I did: 1.Configured SFML in VS15 in Windows 8.1 2. I installed the newswet version of CMake 3. Installed also newest SFGUI from Github. 4.In Cmake GUI as a build I choose my project in VS and as a source - SFGUI directory. 5.In CMake Configure and there are the errors. Did I missed something?

qttorch Build Error Ubuntu 14.04

I'm trying to install qttorch package on Ubuntu 14.04,
but I get this error during installation:
CMake Warning at /usr/share/cmake-3.2/Modules/FindQt4.cmake:626 (message):
/usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib/x86_64-linux-gnu" but
QtCore could not be found there. Qt is NOT installed correctly for the
target build environment.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
CMake Error at /usr/share/cmake-3.2/Modules/FindQt4.cmake:634 (message):
Could NOT find QtCore. Check
/tmp/luarocks_qtlua-scm-1-2765/qtlua/build/CMakeFiles/CMakeError.log for
more details.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_qtlua-scm-1-2765/qtlua/build/CMakeFiles/CMakeOutput.log".
Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec - Build error: Failed building.
Is libqtcore4 the right package for QTCore? or is there another package that should be installed?
because it's already installed in "/usr/lib/x86_64-linux-gnu" as qmake reported!
I also tried reinstalling it, but still the same error!!
In most Linux distributions the packages are split between development and none-development parts. Usually the normal package only includes the shared library, data and executables while the dev package adds headers, static libraries and build tools like qmake. I assume this split is done to save space.
For ubuntu the dev packages usually has the -dev suffix. So try if a libqtcore4-dev package exists. Otherwise, libqt4-dev should include it.