Skip to content

Commit

Permalink
changes in cmake files required for bloom-release
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniferBuehler committed Mar 3, 2016
1 parent fc575da commit 1225783
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 35 deletions.
68 changes: 49 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ if (NOT BUILD_STATIC_LIB)
set (BUILD_STATIC_LIB false)
endif (NOT BUILD_STATIC_LIB)

if (NOT SKIP_SHARED_LIB)
set (SKIP_SHARED_LIB false)
endif (NOT SKIP_SHARED_LIB)

set (GRASPIT_DEFINES
-DGRASPIT_RELEASE
#-DGRASPIT_DEBUG
Expand Down Expand Up @@ -110,6 +114,8 @@ set (GRASPIT_INCLUDEDIR_HEADERS
${GSRC}/include/gws.h
${GSRC}/include/gwsprojection.h
${GSRC}/include/ivmgr.h
${GSRC}/include/ivmgr_abstract.h
${GSRC}/include/ivmgr_nogui.h
${GSRC}/include/jacobian.h
${GSRC}/include/joint.h
${GSRC}/include/kinematicChain.h
Expand Down Expand Up @@ -307,6 +313,7 @@ set (MOC_HEADERS


set (GRASPIT_CORE_SOURCES
${GSRC}/src/debug.cpp
${GSRC}/src/graspitParser.cpp
${GSRC}/src/arch.cpp
${GSRC}/src/robots/barrett.cpp
Expand Down Expand Up @@ -336,6 +343,7 @@ set (GRASPIT_CORE_SOURCES
${GSRC}/src/gws.cpp
${GSRC}/src/gwsprojection.cpp
${GSRC}/src/ivmgr.cpp
${GSRC}/src/ivmgr_nogui.cpp
${GSRC}/src/jacobian.cpp
${GSRC}/src/joint.cpp
${GSRC}/src/kinematicChain.cpp
Expand Down Expand Up @@ -714,10 +722,12 @@ set (GRASPIT_LIBRARY_SOURCES
${UI_OUTFILES}
${MOC_OUTFILES}
)
## Declare a C++ library
add_library(graspit SHARED
${GRASPIT_LIBRARY_SOURCES}
)

if (NOT SKIP_SHARED_LIB)
add_library(graspit SHARED
${GRASPIT_LIBRARY_SOURCES}
)
endif (NOT SKIP_SHARED_LIB)

#add_library(graspit_qt_image_collection
# SHARED
Expand All @@ -734,6 +744,9 @@ if(BUILD_STATIC_LIB)
target_compile_options(graspit_static PRIVATE -fPIC)
endif(BUILD_STATIC_LIB)


## Make simulator executable

# sources for executable graspit_simulator
set(SIMULATOR_SRC ${GSRC}/src/main.cpp)

Expand All @@ -751,10 +764,11 @@ if (BUILD_STATIC_LIB)
endif (BUILD_STATIC_LIB)


## Make simulator executable
add_executable(graspit_simulator
${SIMULATOR_SRC}
)
if (NOT SKIP_SHARED_LIB OR BUILD_STATIC_LIB)
add_executable(graspit_simulator
${SIMULATOR_SRC}
)
endif (NOT SKIP_SHARED_LIB OR BUILD_STATIC_LIB)

## System libraries which are needed for graspit
set(GRASPIT_LINK_LIBRARIES
Expand All @@ -766,15 +780,21 @@ set(GRASPIT_LINK_LIBRARIES
)


target_link_libraries(graspit
${GRASPIT_LINK_LIBRARIES}
)
if (NOT SKIP_SHARED_LIB)
target_link_libraries(graspit
${GRASPIT_LINK_LIBRARIES}
)
endif (NOT SKIP_SHARED_LIB)

# link the libraries: If a static lib is built, use this one.
# otherwise, use the shared lib.
if(BUILD_STATIC_LIB)
target_link_libraries(graspit_static ${GRASPIT_LINK_LIBRARIES})
target_link_libraries(graspit_simulator ${GRASPIT_LINK_LIBRARIES})
else(BUILD_STATIC_LIB)
target_link_libraries(graspit_simulator graspit)
if (NOT SKIP_SHARED_LIB)
target_link_libraries(graspit_simulator graspit ${GRASPIT_LINK_LIBRARIES})
endif(NOT SKIP_SHARED_LIB)
endif(BUILD_STATIC_LIB)


Expand Down Expand Up @@ -804,8 +824,16 @@ endif (catkin_FOUND)
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )


set(INSTALL_BINS graspit_simulator)

if (NOT SKIP_SHARED_LIB)
set(INSTALL_BINS ${INSTALL_BINS} graspit)
endif (NOT SKIP_SHARED_LIB)


## Mark executables and/or libraries for installation
install(TARGETS graspit graspit_simulator
install(TARGETS ${INSTALL_BINS}
ARCHIVE DESTINATION ${LIB_DESTINATION}
LIBRARY DESTINATION ${LIB_DESTINATION}
RUNTIME DESTINATION ${BIN_DESTINATION}
Expand Down Expand Up @@ -881,13 +909,15 @@ endif (PLY)

# Generate and install configuration files for libraries:

install(TARGETS
graspit
EXPORT graspit-lib-targets
DESTINATION ${LIB_DESTINATION})
if (NOT SKIP_SHARED_LIB)
install(TARGETS
graspit
EXPORT graspit-lib-targets
DESTINATION ${LIB_DESTINATION})

install(EXPORT graspit-lib-targets
DESTINATION ${LIB_DESTINATION})
install(EXPORT graspit-lib-targets
DESTINATION ${LIB_DESTINATION})
endif (NOT SKIP_SHARED_LIB)

if(BUILD_STATIC_LIB)
install(TARGETS
Expand Down
29 changes: 13 additions & 16 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,26 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>libblas-dev</build_depend>
<build_depend>liblapack-dev</build_depend>
<build_depend>libsoqt4-dev</build_depend>
<!--build_depend>household_objects_database</build_depend-->
<build_depend>libqt4</build_depend>
<build_depend>libqt4-dev</build_depend>
<build_depend>libqt4-opengl-dev</build_depend>
<build_depend>libqt4-opengl</build_depend>
<build_depend>libqt4-sql-psql</build_depend>
<build_depend>libcoin80-dev</build_depend>
<build_depend>libsoqt4-dev</build_depend>
<build_depend>libqhull</build_depend>
<build_depend>subversion</build_depend>

<build_depend>household_objects_database</build_depend>
<build_depend>libcoin80-dev</build_depend>
<build_depend>libblas-dev</build_depend>
<build_depend>liblapack-dev</build_depend>

<run_depend>libsoqt4-dev</run_depend>
<run_depend>household_objects_database</run_depend>
<run_depend>libqt4</run_depend>
<run_depend>libqt4-dev</run_depend>
<run_depend>libqt4-opengl</run_depend>
<run_depend>libqt4-sql-psql</run_depend>
<run_depend>libqhull</run_depend>
<run_depend>libcoin80-dev</run_depend>
<run_depend>libblas-dev</run_depend>
<run_depend>liblapack-dev</run_depend>

<!-- The following libraries do not have run-time version in rosdep:
<run_depend>libblas</run_depend>
<run_depend>liblapack</run_depend>
<run_depend>libcoin80</run_depend>
<run_depend>libsoqt4</run_depend>
-->

<run_depend>household_objects_database</run_depend>
</package>

0 comments on commit 1225783

Please sign in to comment.