CMake Error at CMakeLists.txt:4 (find_package): By not providing “FindParaView.cmake“ in CMAKE_MOD

CMake fails
insert image description here
and the content of the error is:
CMake Error at CMakeLists.txt:4 (find_package):
By not providing “FindParaView.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “ParaView”,
but CMake did not find one.
It means that ParaViewConfig.cmake or paraview-config.cmake cannot be found
insert image description here
and then suggestions for modification are given below:
insert image description here

Add ParaView_DIR in CMakeLists.txt, the specific code is as follows: global search paraview-config.cmakeor ParaViewConfig.cmakefind the path of this file.
insert image description here

Then add the following code:
Note that the front of _DIR needs to be changed to the missing content in the error report, and then the path is written as the path containing that file

set(ParaView_DIR D:/homework/ParaView-v5.11.0/build/lib/cmake/paraview-5.11)

insert image description here
Then save, re-run CMake, and then you can run successfully!

insert image description here

Guess you like

Origin blog.csdn.net/changyana/article/details/128721135