`make install` attempts to install to system-root (`/kissfft`)
JayFoxRox opened this issue · 0 comments
I'm cross-compiling and getting the following:
$ make install
[...]
[100%] Linking C static library libkissfft-float.a
[100%] Built target kissfft
Install the project...
-- Install configuration: ""
-- Installing: /my-custom-toolchain-path/usr/local/lib/libkissfft-float.a
CMake Error at cmake_install.cmake:53 (file):
file cannot create directory: /kissfft. Maybe need administrative
privileges.
This has to do with:
Lines 104 to 110 in 8f47a67
I'm compiling for a "Generic" system (which will probably change as the CMake support in our toolchain improves), and I'm cross-compiling. So GNUInstallDirs is not included.
This breaks the next few lines break, because CMAKE_INSTALL_INCLUDEDIR was never set:
Lines 112 to 117 in 8f47a67
I think it's best to include GNUInstallDirs unconditionally. Although I'm not sure how deployment on Windows works.
It's worth noting that our toolchain is using a GNU toolchain layout with /usr/local/include (but it's also using clang in MSVC compatibility mode to compile for Windows - similar to cygwin/mingw, except it's neither of those).