Skip to content

Commit

Permalink
Install firebirds sample's plugin along with libavg (closes #786)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotty007 committed Jul 16, 2020
1 parent 4224fd1 commit b45afe9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ setup(name='libavg',
package_data={
'': listDataFiles(os.path.join('libavg', 'data')) +
listDataFiles(os.path.join('libavg', 'shaders')) +
listDataFiles(os.path.join('libavg', 'plugin')) +
listDataFiles(os.path.join('libavg', 'test')) +
['avg.so', ]
},
Expand Down
10 changes: 10 additions & 0 deletions src/samples/firebirds/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ elseif (${PLATFORM_MACOSX})
target_link_libraries(${PLUGIN_NAME} -bundle -flat_namespace "-undefined suppress")
target_link_libraries(${PLUGIN_NAME} ${LIBXML2_LDFLAGS} ${PLUGIN_LIBS})
endif()

set(plugin_dir "${CMAKE_BINARY_DIR}/python/libavg/plugin/")
add_custom_command(TARGET collisiondetector POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${plugin_dir}"
)
add_custom_command(TARGET collisiondetector POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_BINARY_DIR}/collisiondetector${CMAKE_SHARED_MODULE_SUFFIX}"
"${plugin_dir}"
)

0 comments on commit b45afe9

Please sign in to comment.