Предположим, я установил некоторую библиотеку с vcpkg
, и она зависит от многих (скажем, cgal
). Теперь я хочу скомпилировать какую-нибудь программу для этих библиотек с CMake
.
Как мне сообщить CMake
обо всех местоположениях всех загруженных мной библиотек? Включая основную библиотеку, которую я установил? У меня есть только один параметр в CMake
, называемый «исходный каталог», который будет указывать на мой код. Где настройки для библиотек?
D:\Users\ThirdPartyDesign\CGAL-5.0-examples\CGAL-5.0\examples\Triangulation_2
λ env | grep CMAKE
CMAKE_TOOLCHAIN_FILE=D:\Users\ThirdPartyDesign\vcpkg\scripts\buildsystems\vcpkg.cmake
D:\Users\ThirdPartyDesign\CGAL-5.0-examples\CGAL-5.0\examples\Triangulation_2
λ cmake .
CMake Warning at CMakeLists.txt:18 (find_package):
By not providing "FindCGAL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CGAL", but
CMake did not find one.
Could not find a package configuration file provided by "CGAL" with any of
the following names:
CGALConfig.cmake
cgal-config.cmake
Add the installation prefix of "CGAL" to CMAKE_PREFIX_PATH or set
"CGAL_DIR" to a directory containing one of the above files. If "CGAL"
provides a separate development package or SDK, be sure it has been
installed.
-- This program requires the CGAL library, and will not be compiled.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Users/ThirdPartyDesign/CGAL-5.0-examples/CGAL-5.0/examples/Triangulation_2