Reputation: 51109
I have installed CGAL
with vcpkg
. Also installed Qt5
with vcpgk
. Then I have dowloaded CGAL-5.0-examples
and ran cmake-gui ..
. It did without errors. Qt5 variables appeared to point to some places inside vcpkg
. Unfortunately, after sln
is genereted and I am opening it, I can't build it:
Severity Code Description Project File Line Suppression State Suppression State
Error LNK1104 cannot open file 'Debug\CGAL_Qt5_moc_and_resources.lib' for_loop_2 D:\dev\CGAL-5.0\examples\Triangulation_2\build\LINK 1
Error C1083 Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_CGAL.cpp': No such file or directory CGAL_Qt5_moc_and_resources D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1
Error C1083 Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_Input.cpp': No such file or directory CGAL_Qt5_moc_and_resources D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1
Error C1083 Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_File.cpp': No such file or directory CGAL_Qt5_moc_and_resources D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1
Error C1083 Cannot open source file: 'D:\dev\CGAL-5.0\examples\Triangulation_2\build\qrc_Triangulation_2.cpp': No such file or directory CGAL_Qt5_moc_and_resources D:\dev\CGAL-5.0\examples\Triangulation_2\build\c1xx 1
Why is it trying to open cpp
files from build directory, although source directory is one level up?
Upvotes: 0
Views: 745
Reputation: 726
You need to install cgal[qt] for examples that use Qt5 :
vcpkg install cgal[qt]
This contains specific headers for most 3D examples and demos used by CGAL.
Also there is a specificity when using vcpkg with cmake, because the default behavior for Optional Platform
is x64 in cmake, but x86 in vcpkg. it means that if you leave it empty, everything that comes from outside vcpkg will be x64, and everything inside vcpkg x86, and you will run into warnings, link errors and probably some build errors too. This page explains the steps to configure and build an example of CGAL with vcpg.
Upvotes: 1