Could not find a package configuration file provided by "io2d" (Windows) - c++

I am newbie in using C++ and I have hard times to compile the io2d with CMake. I am currently using Windows, and I have used vcpkg to download the io2d packages, cairo packages and graphicsmagick packages. Everything are downloaded by both x64 and x86 windows.
The way I follow through on the installation work is from the Buildings Steps in Cairo/Win32 on Windows:
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
However, when I build with cmake -G "Visual Studio 16 2019" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ..\. , it appears the following error. And I have looked for online but seems cannot find a solution with windows system.
Happy to get any opinions and help on this issue.
PS C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project\P0267_RefImpl\Debug> cmake -G "Visual Studio 16 2019" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ..\.
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
Default IO2D backend was not specified, choosing automatically...
Found Windows, using CAIRO_WIN32.
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Cairo (missing: CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
cmake/FindCairo.cmake:102 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
I have tried another way to compile, but also does not work which yield to another problem. The location of my entire project folder is in the following address: C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project.
When I tried to build the project, firstly I cd to the address above.
Then use mkdir build and cd build
Then run cmake ..
But, it appears the error code in finding the io2d configuration files. I have no idea how to let CMake to find the required files. The error is located as belows:
PS C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project\build> cmake ..
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
CMake Error at C:/source/vcpkg/scripts/buildsystems/vcpkg.cmake:622 (_find_package):
By not providing "Findio2d.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "io2d", but
CMake did not find one.
Could not find a package configuration file provided by "io2d" with any of
the following names:
io2dConfig.cmake
io2d-config.cmake
Add the installation prefix of "io2d" to CMAKE_PREFIX_PATH or set
"io2d_DIR" to a directory containing one of the above files. If "io2d"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
-- Configuring incomplete, errors occurred!

Related

The same vcpkg repository clone used in classic and manifest mode

I was using vcpkg in classic mode. Then I found about vcpkg manifests, I placed a vcpkg.json file on my project folder and fired cmake. And the following happened:
-- Building for: Visual Studio 16 2019
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.29.1.windows.1")
-- Bootstrapping vcpkg before install
-- Bootstrapping vcpkg before install - failed
CMake Error at C:/Users/user/project/src/vcpkg/scripts/buildsystems/vcpkg.cmake:850 (message):
vcpkg install failed. See logs for more information:
C:\Users\user\project\src\mylib\x64\vcpkg-bootstrap.log
Call Stack (most recent call first):
C:/Qt/Tools/CMake_64/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake:121 (include)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj
C:\Users\user\project\src\mylib
done
It tells me to check vcpkg-bootstrap.log but it is empty.
So, am I messing with something or it's not really supported to use vcpkg in manifest mode after it has been used in classic mode?
Or, in other words, do I need a fresh vcpkg git clone to use manifests?

How to I install libuv and subsequently uWebSockets library on Windows 10?

I am trying to install few libraries that are required for cmake to build a project.
For successful build, cmake requires libuv and uWebSockets libraries to be installed:
https://github.com/uNetworking/uWebSockets
I'm using MinGW gcc compiler (C:\msys64\mingw64) along with cmake.
However, during configuration cmake fails with the following errors:
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error at examples/example1/CMakeLists.txt:14 (find_library):
[cmake] Could not find UV_LIB using the following names: uv
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
Now, I have downloaded the tar-balls from the above GitHub repo, but I am unable to understand where and how this is to be installed.

Mongodb C-driver install fail on windows

when build c-driver libbson, I have a CMake error
C:\mongo-c-driver-1.15.0\src\libbson>cmake -DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver -G "Visual Studio 14 2015 Win64"
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.17134.
libbson version (from VERSION_CURRENT file): 1.15.0
-- struct timespec found
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/CMakePackageConfigHelpers.cmake:265 (message):
Variable LIBRARY_INSTALL_DIRS does not exist
Call Stack (most recent call first):
build/cmake/BSONPackage.cmake:10 (configure_package_config_file)
build/cmake/BSONPackage.cmake:26 (install_package_config_file)
CMakeLists.txt:378 (include)
and LIBRARY_INSTALL_DIRS is in BSONPackage.cmake
set (INCLUDE_INSTALL_DIRS ${BSON_HEADER_INSTALL_DIR})
set (LIBRARY_INSTALL_DIRS ${CMAKE_INSTALL_LIBDIR})
set (PACKAGE_LIBRARIES bson-1.0)
How can i build it?
I had the same CMake error when running this command inside the libbson folder C:\mongo-c-driver-1.15.0\src\libbson. Can you try running it in the C driver folder instead:
C:\mongo-c-driver-1.15.0>cmake -DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver -G "Visual Studio 14 2015 Win64"

CMake 3.4.3 Can't find CUDA on windows

I am trying to build something with CMake (it has to be an older version because of the project) and when I run it I get this error:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindCUDA.cmake:617 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
libethash-cuda/CMakeLists.txt:3 (FIND_PACKAGE)
I have looked everywhere online but I only find solutions for Linux.
So, my CMake (v3.7.0) found the toolkit automatically. It's located in:
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0
In general, I've found on Windows it has difficulty finding the SDK which is in:
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0
To set CUDA_TOOLKIT_ROOT_DIR in CMake on windows, open up cmake-gui, run "configure" once then go to "advanced:"
Scroll down until you see CUDA_TOOLKIT_ROOT_DIR:
And set it to your CUDA toolkit directory (which is probably C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 if you're using CUDA version 8.0)
git clone —recursive https://github.com/Danko-Lab/Rgtsvm.git
cd Rgtsvm
git submodule init
git submodule update
mkdir build
cd build
cmake .. -G”Visual Studio 15 2017 Win64" -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib/x64" -DUSE_CUDA=ON -DLIBR_EXECUTABLE=”C:/Program Files/Microsoft SQL Server/140/R_SERVER/bin/R.exe” -DR_LIB=ON -DGPU_COMPUTE_VER=52
cmake --build . --target install --config Release
does it for Win10, where
-G”Visual Studio 15 2017 Win64" what your VS version is
-DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib/x64" where your CUDA version is installed
-DGPU_COMPUTE_VER=52 choose your GPU architecture

CMake (win) mysql c++ connector - cant find mysql

i'm trying to build the c++ connector for VS 2012 with CMake.
It's searching for the MySQL Directory but it can't find it.
C:\mysql-connector-c++-1.1.3>cmake -DBOOST_ROOT:STRING=C:\cpp\boost
CMake Warning (dev) in CMakeLists.txt:
A logical block opening on the line
C:/mysql-connector-c++-1.1.3/CMakeLists.txt:39 (if)
closes on the line
C:/mysql-connector-c++-1.1.3/CMakeLists.txt:41 (endif)
with mis-matching arguments.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Environment compile flags:
-- Environment link flags:
-- Boost version: 1.53.0
-- BOOST_INCLUDE_DIRS=C:/cpp/boost
-- ENV{MYSQL_DIR} =
**CMake Error at FindMySQL.cm:220 (MESSAGE):
Cannot find MySQL. Include dir: MYSQL_INCLUDE_DIR-NOTFOUND library dir:**
cxxflags:
Call Stack (most recent call first):
CMakeLists.txt:173 (INCLUDE)
-- Configuring incomplete, errors occurred!
Is there a way to set it manual by hand?
Thank you.
Of course: if you know where your MySql include directories are located (say C:\MySql\include for example), just call CMake with the following -D option:
cmake -DMYSQL_INCLUDE_DIR=C:\MySql\include
The -D command line option defines a CMake constant with a given value if needed. When CMake can not find a variable and you know which value it should have, you should give it to CMake with -D when you call it.
Usually the MySQL files you need are found in the Program Files folder.
In my case I installed the MySQL C Connector to the default location that is in C:\Program Files\MySQL\MySQL Connector C 6.1.
You can follow the steps from this similar post to compile the MySQL C++ Connector on Visual Studio 2012.
Note: If you do not want it to be 64bit then on the cmake call change -G "Visual Studio 11 Win64" to -G "Visual Studio 11".
Adding MYSQL_DIR to my computer's environment variables solved the problem.
This dir should be set to MySQL server's dir, to me it is "E:\MySQL\MySQL Server 5.6"
Hope it helps.