Skip to content

Commit

Permalink
Omit Python data installation in non-Python builds (#1437)
Browse files Browse the repository at this point in the history
Since the addition of #1237, we now create a python folder, with a copy of the stdlibs, even if we're not building python.

This is at best redundant, and in my particular case, caused a problem in a downstream build script.
  • Loading branch information
pmolodo authored Aug 25, 2023
1 parent 77dd15b commit bc6a97c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ if(SKBUILD)
set(MATERIALX_PYTHON_LIBRARIES_PATH "${SKBUILD_PLATLIB_DIR}/MaterialX/libraries")
endif()

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION "${MATERIALX_PYTHON_LIBRARIES_PATH}"
PATTERN "CMakeLists.txt" EXCLUDE
PATTERN "pbrlib_genosl_impl.*" EXCLUDE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/pbrlib/genosl/pbrlib_genosl_impl.${PBRLIB_SUFFIX}"
DESTINATION "${MATERIALX_PYTHON_LIBRARIES_PATH}/pbrlib/genosl/" RENAME pbrlib_genosl_impl.mtlx)
if(MATERIALX_BUILD_PYTHON)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION "${MATERIALX_PYTHON_LIBRARIES_PATH}"
PATTERN "CMakeLists.txt" EXCLUDE
PATTERN "pbrlib_genosl_impl.*" EXCLUDE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/pbrlib/genosl/pbrlib_genosl_impl.${PBRLIB_SUFFIX}"
DESTINATION "${MATERIALX_PYTHON_LIBRARIES_PATH}/pbrlib/genosl/" RENAME pbrlib_genosl_impl.mtlx)
endif()

0 comments on commit bc6a97c

Please sign in to comment.