-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isolates motion extraction sample code
- Loading branch information
1 parent
92d3d38
commit 8deec00
Showing
5 changed files
with
90 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
add_custom_command( | ||
DEPENDS $<$<BOOL:${ozz_build_fbx}>:BUILD_DATA> | ||
"${CMAKE_CURRENT_LIST_DIR}/README.md" | ||
"${ozz_media_directory}/bin/pab_skeleton.ozz" | ||
"${ozz_media_directory}/bin/pab_atlas_raw.ozz" | ||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/README.md" | ||
"${CMAKE_CURRENT_BINARY_DIR}/media/skeleton.ozz" | ||
"${CMAKE_CURRENT_BINARY_DIR}/media/raw_animation.ozz" | ||
COMMAND ${CMAKE_COMMAND} -E make_directory media | ||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/README.md" . | ||
COMMAND ${CMAKE_COMMAND} -E copy "${ozz_media_directory}/bin/pab_skeleton.ozz" "./media/skeleton.ozz" | ||
COMMAND ${CMAKE_COMMAND} -E copy "${ozz_media_directory}/bin/pab_atlas_raw.ozz" "./media/raw_animation.ozz" | ||
VERBATIM) | ||
|
||
add_executable(sample_motion_extraction | ||
sample_motion_extraction.cc | ||
"${CMAKE_CURRENT_BINARY_DIR}/README.md" | ||
"${CMAKE_CURRENT_BINARY_DIR}/media/skeleton.ozz" | ||
"${CMAKE_CURRENT_BINARY_DIR}/media/raw_animation.ozz") | ||
target_link_libraries(sample_motion_extraction | ||
sample_framework) | ||
target_copy_shared_libraries(sample_motion_extraction) | ||
|
||
set_target_properties(sample_motion_extraction | ||
PROPERTIES FOLDER "samples") | ||
|
||
if(EMSCRIPTEN) | ||
# Resource files are embedded to the output file with emscripten | ||
set_target_properties(sample_motion_extraction | ||
PROPERTIES LINK_FLAGS "--embed-file media --embed-file README.md") | ||
|
||
install(FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/sample_motion_extraction.html | ||
${CMAKE_CURRENT_BINARY_DIR}/sample_motion_extraction.js | ||
${CMAKE_CURRENT_BINARY_DIR}/sample_motion_extraction.wasm | ||
DESTINATION bin/samples/motion) | ||
else() | ||
install(TARGETS sample_motion_extraction DESTINATION bin/samples/motion_extraction) | ||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/media DESTINATION bin/samples/motion_extraction) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/README.md DESTINATION bin/samples/motion_extraction) | ||
endif(EMSCRIPTEN) | ||
|
||
add_test(NAME sample_motion_extraction COMMAND sample_motion_extraction "--max_idle_loops=${ozz_sample_testing_loops}" $<$<BOOL:${ozz_run_tests_headless}>:--norender>) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters