CMake install dirs code not portable

Issue #51 resolved
Jacob Hinkle created an issue

The installation directories are set with some sort of hacky CMake code currently. For instance, on archlinux, the LIBRARY_INSTALL_DIR on my machine defaults to just lib and PYTHON_INSTALL_DIR gets set to $HOME/python/site-packages. On windows, there is no $ENV{'HOME'} so it ends up silently putting stuff in C:\python.

This is a problem for one, because they are not set as options so I can't override them when doing a direct cmake ... command. They should be found automatically using some more idiomatic cmake (if there is such a thing). In fact, I am not sure LIBRARY_INSTALL_DIR is used anywhere. It seems we only install the python package, which is probably just fine, and we could remove the LIBRARY_INSTALL_DIR stuff.

Unless there's any objection, I will yank out that part, and replace the current code setting the python install dir with something that finds the right site-packages dir, and is an option that can be overriden on the command line.

Comments (4)

  1. Jacob Hinkle reporter

    i reverted it because it was messing up GenPythonModule.py. Might look at cleaning that up later

  2. Log in to comment