dpctl icon indicating copy to clipboard operation
dpctl copied to clipboard

dpctl should provide cmake config files and install them

Open diptorupd opened this issue 3 years ago • 2 comments

The FindDpctl.cmake is not installed as part of the conda package nor do we currently provide a DpctlConfig.cmake file. The result is that dpctl cannot be found by external cmake projects.

CMake Error at CMakeLists.txt:7 (find_package): By not providing "FindDpctl.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Dpctl", but CMake did not find one.

Could not find a package configuration file provided by "Dpctl" with any of the following names:

DpctlConfig.cmake
dpctl-config.cmake

Add the installation prefix of "Dpctl" to CMAKE_PREFIX_PATH or set "Dpctl_DIR" to a directory containing one of the above files. If "Dpctl" provides a separate development package or SDK, be sure it has been installed.

diptorupd avatar Jun 10 '22 22:06 diptorupd

I think this would be closed by #853.

With #853 all one needs to do python setup.py develop -- -DPDCTL_MODULE_PATH=$(python -m dpctl --cmakedir) to build external package which uses dpctl via find_package(dpctl) in their CMakeLists.txt.

oleksandr-pavlyk avatar Jun 24 '22 15:06 oleksandr-pavlyk

No, we should create dpctlConfig.cmake and make sure it installed in $PREFIX/share/cmake/dpctl/dpctlConfig.cmake.

Thus would allow find_package(Dpctl REQUIRED) to work without setting any additional module path variables.

oleksandr-pavlyk avatar Sep 15 '23 21:09 oleksandr-pavlyk