RenderKit / openvkl

Intel(R) Open Volume Kernel Library
Apache License 2.0
202 stars 27 forks source link

Error while installing OpenVKL targets #19

Closed NadirRoGue closed 1 year ago

NadirRoGue commented 1 year ago

While updating from OpenVKL 1.3.0 to 1.3.2, I stumbled upon an issue when trying to install it to a custom location. When installation starts, I get the following message on console:

Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:49 (file):
  file cannot create directory: /openvkl.  Maybe need administrative
  privileges.

Following the trace to the file and line, the error came from here: file(INSTALL DESTINATION "/openvkl" TYPE FILE FILES "/home/nadir/Programs/OSPRAY_2_11/src_dir/openvkl/build/openvkl/include/openvkl/version.h")

Checking on the main CMakeLists.txt, I can see that CMAKE_INSTALL_INCLUDEDIR has been used before including the GNUInstallDirs:

https://github.com/openvkl/openvkl/blob/fac6c96b24ae73941716b7368ffc289eb9c47532/CMakeLists.txt#L42-L51

Manually setting CMAKE_INSTALL_INCLUDEDIR to include (The default value provided by GNUInstallDirs) solves the issue for 1.3.8. Moving up the include of GNUInstallDirs would be the best way to fix it, unless this behaviour is on purpose.

ZhongRuoyu commented 1 year ago

Will be fixed by #18.

NadirRoGue commented 1 year ago

Thanks!

gregjohnson commented 1 year ago

Thanks for the report, and the suggested fix! I'll follow up when this is resolved.

gregjohnson commented 1 year ago

18 is merged, and available in the latest release. Thanks!