Thanks Brad for setting my head straight with regard to this (as usual). This is the problem with such a nice cross-platform development tool: though I've never developed on windows (or extensively on linux), CMake makes it so easy to get 95% of the way to a cross-platform build solution.

I thank everyone for help with the last 5% of corner cases. (And for CMake, without which I'd have never even tried to make things build on windows.)

(3) Install the library in a location with a known relative path to the python modules. On OS X, link the *runtime library* with an install_name containing this relative path. On other unix, link each *python module* with an rpath containing that relative path. (Is this right??) On windows... is this even possible?

This may work on OSX if the install_name uses the @executable_path feature but it will not work in general. RPATH entries cannot be relative paths because they would be interpreted relative to the current working directory, not the executable or module location!

Of course, silly me. I guess I could always cwd() before loading the module to make this work, but that's piling ugliness on ugliness. Better to not go there.

The solution on Windows is just to put the runtime DLLs in the same directory as the modules that need them.

Is this the case even if the modules aren't in the same directory as the python executable? The python executable will be in one place, and the python module dlls will be in another, and the runtime dll will be in the same directory as the modules. The windows loader will then know to find the runtime in the directory that the modules are in?

Thanks again,

Zach


-Brad
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to