In one of my builds I'm doing:
-DMATERIALX_BUILD_RENDER=OFF
-DMATERIALX_BUILD_RENDER_PLATFORMS=OFF
-DMATERIALX_BUILD_VIEWER=OFF
-DMATERIALX_BUILD_GRAPH_EDITOR=OFF
in order to get a headless library that will link without x11.
In 1.39.5:
if(UNIX AND NOT APPLE)
find_dependency(X11 REQUIRED COMPONENTS Xt)
if("RenderGlsl" IN_LIST MaterialX_FIND_COMPONENTS)
find_dependency(OpenGL REQUIRED)
set(MaterialX_RenderGlsl_FOUND TRUE)
endif()
endif()
Should I think be something like:
if(UNIX AND NOT APPLE AND (TARGET MaterialXRenderHw OR TARGET MaterialXRenderGlsl))
find_dependency(X11 REQUIRED COMPONENTS Xt)
endif()
if(TARGET MaterialXRenderGlsl)
find_dependency(OpenGL REQUIRED)
if("RenderGlsl" IN_LIST MaterialX_FIND_COMPONENTS)
set(MaterialX_RenderGlsl_FOUND TRUE)
endif()
endif()
In one of my builds I'm doing:
in order to get a headless library that will link without x11.
In 1.39.5:
MaterialX/cmake/modules/MaterialXConfig.cmake.in
Line 42 in 257e02f
Should I think be something like: