Proper blender use
This commit is contained in:
@@ -12,6 +12,19 @@ find_program (MAKE_EXECUTABLE make DOC make REQUIRED)
|
||||
find_package (PkgConfig)
|
||||
pkg_check_modules(GFX_LIBS REQUIRED wayland-client wayland-protocols x11)
|
||||
|
||||
set(CPU ${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
set(BLENDER_DIST ${CMAKE_SOURCE_DIR}/prebuilts/Blender-3.6-unknown-linux-${CPU}.tar.xz)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/blender-bin/bin/blender
|
||||
COMMAND [ -f ${BLENDER_DIST} ] || ./build-blender.sh
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/blender-bin
|
||||
COMMAND tar xf ${BLENDER_DIST} -C ${CMAKE_BINARY_DIR}/blender-bin
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/blender-bin/bin
|
||||
COMMAND ln -sf ../Blender-3.6-unknown-linux-${CPU}/blender ${CMAKE_BINARY_DIR}/blender-bin/bin/blender
|
||||
)
|
||||
|
||||
add_custom_target(blender DEPENDS ${CMAKE_BINARY_DIR}/blender-bin/bin/blender)
|
||||
|
||||
ExternalProject_Add(zlib-nominizip
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib
|
||||
@@ -279,13 +292,13 @@ ExternalProject_Add(flecs-static
|
||||
|
||||
ExternalProject_Add(world2
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ogre-projects/world2
|
||||
CMAKE_ARGS ${CUSTOM_OPTS}
|
||||
DEPENDS ogre ogre-procedural ogre-pagedgeometry flecs SDL
|
||||
CMAKE_ARGS ${CUSTOM_OPTS} -DBLENDER=${CMAKE_CURRENT_BINARY_DIR}/blender-bin/bin/blender
|
||||
DEPENDS ogre ogre-procedural ogre-pagedgeometry flecs SDL blender
|
||||
)
|
||||
|
||||
ExternalProject_Add(world2-static
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ogre-projects/world2
|
||||
CMAKE_ARGS ${CUSTOM_OPTS_STATIC}
|
||||
DEPENDS ogre-static ogre-procedural-static ogre-pagedgeometry-static flecs-static SDL-static
|
||||
CMAKE_ARGS ${CUSTOM_OPTS_STATIC} -DBLENDER=${CMAKE_CURRENT_BINARY_DIR}/blender-bin/bin/blender
|
||||
DEPENDS ogre-static ogre-procedural-static ogre-pagedgeometry-static flecs-static SDL-static blender
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user