From 122578348c0a425aaa7426c77cc951a677cc78b7 Mon Sep 17 00:00:00 2001 From: Jennifer Buehler Date: Thu, 3 Mar 2016 14:50:37 +0100 Subject: [PATCH] changes in cmake files required for bloom-release --- CMakeLists.txt | 68 ++++++++++++++++++++++++++++++++++++-------------- package.xml | 29 ++++++++++----------- 2 files changed, 62 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f02449ed25..0a97509629 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) @@ -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 @@ -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) @@ -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} @@ -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 diff --git a/package.xml b/package.xml index ec944083af..3ff107ea66 100644 --- a/package.xml +++ b/package.xml @@ -15,29 +15,26 @@ catkin - libblas-dev - liblapack-dev + libsoqt4-dev + + libqt4 libqt4-dev - libqt4-opengl-dev + libqt4-opengl libqt4-sql-psql - libcoin80-dev - libsoqt4-dev libqhull - subversion - - household_objects_database + libcoin80-dev + libblas-dev + liblapack-dev + libsoqt4-dev + household_objects_database libqt4 + libqt4-dev libqt4-opengl libqt4-sql-psql libqhull + libcoin80-dev + libblas-dev + liblapack-dev - - - household_objects_database