Skip to content

Commit

Permalink
Link to X11 targets instead of CMake variables (AcademySoftwareFounda…
Browse files Browse the repository at this point in the history
…tion#1606)

This prevents absolute paths from creeping into the output MaterialXConfig.cmake, which makes it not portable.

Also, in general in modern CMake, targets are preferred over baked paths.
  • Loading branch information
pmolodo authored Nov 29, 2023
1 parent b50dea8 commit b8cc4de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions source/MaterialXRenderGlsl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ elseif(UNIX)
target_link_libraries(
${MATERIALX_MODULE_NAME}
OpenGL::GL
${X11_LIBRARIES}
${X11_Xt_LIB})
X11::X11
X11::Xt)
endif()

set_target_properties(
Expand Down
4 changes: 2 additions & 2 deletions source/MaterialXRenderHw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ elseif(UNIX)
${MATERIALX_MODULE_NAME}
MaterialXRender
${CMAKE_DL_LIBS}
${X11_LIBRARIES}
${X11_Xt_LIB})
X11::X11
X11::Xt)
endif()

set_target_properties(
Expand Down
4 changes: 2 additions & 2 deletions source/MaterialXRenderMsl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ elseif(UNIX)
target_link_libraries(
${MATERIALX_MODULE_NAME}
OpenGL::GL
${X11_LIBRARIES}
${X11_Xt_LIB})
X11::X11
X11::Xt)
endif()

set_target_properties(
Expand Down

0 comments on commit b8cc4de

Please sign in to comment.