Fixed install scripts

This commit is contained in:
Nate Koenig 2012-10-29 14:17:08 -07:00
parent 2ef8e82ab1
commit c49c347efd
3 changed files with 60 additions and 67 deletions

View File

@ -31,44 +31,62 @@ string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
set (dirs set (dirs
bookshelf bookshelf
bowl bowl
cabinet cabinet
camera camera
coke_can coke_can
cordless_drill cordless_drill
create create
cube_20k cube_20k
ground_plane ground_plane
hammer hammer
hokuyo hokuyo
kinect kinect
monkey_wrench monkey_wrench
pioneer2dx nist_elevated_floor_120
powerplant nist_fiducial_barrel
pr2 nist_maze_wall_120
pr2_gripper nist_maze_wall_240
simple_arm nist_maze_wall_triple_holes_120
simple_arm_gripper nist_simple_ramp_120
simple_gripper nist_stairs_120
sun pioneer2dx
table powerplant
turtlebot pr2
utility_cart pr2_gripper
willowgarage saucepan
youbot simple_arm
simple_arm_gripper
simple_gripper
sun
table
turtlebot
utility_cart
willowgarage
youbot
)
) set (MODEL_URI_LIST "" CACHE INTERNAL "Model URI List" FORCE)
foreach (dir ${dirs}) foreach (dir ${dirs})
add_custom_target(${dir} add_custom_target(${dir} ALL COMMAND tar czvf ${dir}.tar.gz ../${dir})
ALL install (DIRECTORY ${dir} DESTINATION
COMMAND tar czvf ${dir}.tar.gz ../${dir} ${CMAKE_INSTALL_PREFIX}/share/models)
COMMAND mv ${dir}.tar.gz ../${dir}/model.tar.gz) install (FILES ${PROJECT_BINARY_DIR}/${dir}.tar.gz DESTINATION
install (DIRECTORY ${dir} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/gazebo_models) ${CMAKE_INSTALL_PREFIX}/share/models/${dir})
set(MODEL_URI_LIST "${MODEL_URI_LIST}<uri>file://${dir}</uri>\n")
#CACHE INTERNAL "Model URI List" FORCE)
endforeach () endforeach ()
message (STATUS "Install path: ${CMAKE_INSTALL_PREFIX}/share/gazebo_models") configure_file("${CMAKE_SOURCE_DIR}/manifest.xml.in"
"${PROJECT_BINARY_DIR}/manifest.xml")
install (FILES "${PROJECT_BINARY_DIR}/manifest.xml" DESTINATION
${CMAKE_INSTALL_PREFIX}/share/models/)
message (STATUS "Install path: ${CMAKE_INSTALL_PREFIX}/share/models")
# This must always be last! # This must always be last!
include(CPack) include(CPack)

View File

@ -1,34 +0,0 @@
<?xml version="1.0" ?>
<database>
<name>gazebosim</name>
<license>Creative Commons Attribution 3.0 Unported</license>
<models>
<uri>file://bookshelf</uri>
<uri>file://bowl</uri>
<uri>file://cabinet</uri>
<uri>file://coke_can</uri>
<uri>file://cordless_drill</uri>
<uri>file://create</uri>
<uri>file://cube_20k</uri>
<uri>file://ground_plane</uri>
<uri>file://camera</uri>
<uri>file://hammer</uri>
<uri>file://hokuyo</uri>
<uri>file://youbot</uri>
<uri>file://kinect</uri>
<uri>file://monkey_wrench</uri>
<uri>file://pioneer2dx</uri>
<uri>file://powerplant</uri>
<uri>file://pr2</uri>
<uri>file://pr2_gripper</uri>
<uri>file://simple_arm</uri>
<uri>file://simple_arm_gripper</uri>
<uri>file://simple_gripper</uri>
<uri>file://sun</uri>
<uri>file://table</uri>
<uri>file://turtlebot</uri>
<uri>file://utility_cart</uri>
<uri>file://willowgarage</uri>
</models>
</database>

9
manifest.xml.in Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" ?>
<database>
<name>gazebosim</name>
<license>Creative Commons Attribution 3.0 Unported</license>
<models>
@MODEL_URI_LIST@
</models>
</database>