Closed sapetnioc closed 1 year ago
To date the corresponding bv_maker.cfg
line for Conda compilation is the following:
cmake_options += '-DOPENGL_LIBRARY_DIRECTORIES=$CASA/conda/lib;/lib/x86_64-linux-gnu' '-DOPENGL_LIBRARIES=X11;GL;GLdispatch;GLX;/lib/x86_64-linux-gnu/librt.so.1'
For Conda compilation, bv_maker.cfg
is specific to that environment (and would be provided through GitHub). Therefore it is acceptable to me to keep this solution. Another option would be to reject this PR and deal with OpenGL entirerly when building Conda environment by compiling a Mesa used only for compilation.
Probably not the cleanest of every possible solution, but we can do that also. OK for me.
I changed variable names to OPENGL_FIX_LIBRARY_DIRECTORIES
and OPENGL_FIX_LIBRARIES
. Not a big deal.
But I also had to replace Py_hash_t
by long
in sip files to make it work with sip version provided by Conda. It does not seems very clean to me if the expected type is a hash. But I do not really know sip and these __hash__
methods.
To allow compilation in a build environment set up using Conda, I added two optional CMake variables that must be used when compiling OpenGL code:
OPENGL_LIBRARY_DIRECTORIES
that contains a list of directory to add to the linker (with the-L
option) when OpenGL is used.OPENGL_LIBRARIES
containing a list of libraries to add to the linker for OpenGL.The content of these variables will be set only when necessary. For the moment they are defined in
bv_maker.cfg
.