I am having troubles using CMake.
I need to link a C module to LAPACK. Also, this module does #include <lapacke.h>
.
CMake itself and LAPACK are installed in a Conda environment, so they are in a non-standard location.
When I use find_package(LAPACK REQUIRED)
, I can link to the found library via target_link_libraries(mylibrary PUBLIC LAPACK::LAPACK)
.
However, it does not work for target_include_directories
.
And I cannot use LAPACK_INCLUDE_DIRS
, because this module does not set it.
How to help CMake to compile the module correctly after it successfully found LAPACK.
I am having troubles using CMake.
I need to link a C module to LAPACK. Also, this module does #include <lapacke.h>
.
CMake itself and LAPACK are installed in a Conda environment, so they are in a non-standard location.
When I use find_package(LAPACK REQUIRED)
, I can link to the found library via target_link_libraries(mylibrary PUBLIC LAPACK::LAPACK)
.
However, it does not work for target_include_directories
.
And I cannot use LAPACK_INCLUDE_DIRS
, because this module does not set it.
How to help CMake to compile the module correctly after it successfully found LAPACK.
1 Answer
Reset to default 0You have to use find_path
and look for the header yourself.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744642653a4585533.html
评论列表(0条)