Cmake can't find package #101
-
Bug category
Describe the bug Steps to Reproduce
cmake_minimum_required (VERSION 3.18)
project ("MatplotTest")
find_package(Matplot++ REQUIRED)
add_executable(Main MatplotTest.cpp)
target_link_libraries(Main PUBLIC Matplot++::matplot) mkdir build
cd build
cmake .. Output C:\Users\Peter\source\repos\MatplotTest\build>cmake ..
-- The C compiler identification is MSVC 19.28.29515.1
-- The CXX compiler identification is MSVC 19.28.29515.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29515/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29515/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (find_package):
By not providing "FindMatplot++.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Matplot++", but CMake did not find one.
Could not find a package configuration file provided by "Matplot++" with
any of the following names:
Matplot++Config.cmake
matplot++-config.cmake
Add the installation prefix of "Matplot++" to CMAKE_PREFIX_PATH or set
"Matplot++_DIR" to a directory containing one of the above files. If
"Matplot++" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Peter/source/repos/MatplotTest/build/CMakeFiles/CMakeOutput.log". Platform
Environment Details:
|
Beta Was this translation helpful? Give feedback.
Answered by
alandefreitas
Nov 22, 2020
Replies: 1 comment 3 replies
-
https://alandefreitas.github.io/matplotplusplus/integration/binary-packages.html list(APPEND CMAKE_MODULE_PATH put/your/installation/directory/here)
find_package(Matplot++ REQUIRED)
# ...
target_link_libraries(my_target PUBLIC Matplot++::matplot) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
HO-COOH
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/21314893/what-is-the-default-search-path-for-find-package-in-windows-using-cmake
https://alandefreitas.github.io/matplotplusplus/integration/binary-packages.html