Commit 36ae0515 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Enable installation on corba client only

parent d653edd0
......@@ -29,6 +29,8 @@ SET(PROJECT_NAME hpp-wholebody-step-corba)
SET(PROJECT_DESCRIPTION "Corba server and python client for hpp-wholebody-step")
SET(PROJECT_URL "http://github.com/laas/hpp-wholebody-step-corba")
SET(CLIENT_ONLY FALSE CACHE BOOL "Set to true to install the client only")
SET(${PROJECT_NAME}_HEADERS
include/hpp/corbaserver/wholebody-step/server.hh
include/hpp/corbaserver/wholebody-step/fwd.hh
......@@ -44,14 +46,14 @@ IF (HPP_DEBUG)
ENDIF()
# Search for dependencies.
ADD_DOC_DEPENDENCY ("hpp-core >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-wholebody-step >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-corbaserver >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-template-corba >= 1.1")
ADD_REQUIRED_DEPENDENCY("hpp-util >= 3")
# This dependency ensures us that the intermediate __init__.py files are
# already installed.
ADD_REQUIRED_DEPENDENCY("hpp-corbaserver >= 2.1")
IF (NOT CLIENT_ONLY)
ADD_DOC_DEPENDENCY ("hpp-core >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-wholebody-step >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-corbaserver >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-template-corba >= 1.1")
ADD_REQUIRED_DEPENDENCY("hpp-util >= 3")
ENDIF (NOT CLIENT_ONLY)
# Make sure that python submodule is installed in the same prefix as module.
IF (NOT ${HPP_CORBASERVER_PREFIX} STREQUAL ${CMAKE_INSTALL_PREFIX})
MESSAGE(WARNING
......@@ -65,7 +67,10 @@ ADD_SUBDIRECTORY(src)
CONFIG_FILES (include/hpp/corbaserver/wholebody-step/doc.hh)
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
IF (NOT CLIENT_ONLY)
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
ENDIF (NOT CLIENT_ONLY)
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()
# Copyright (c) 2011 CNRS
# Author: Florent Lamiraux
# Author: Florent Lamiraux, Joseph Mirabel
#
# This file is part of hpp-wholebody-step-corba.
# hpp-wholebody-step-corba is free software: you can redistribute it
......@@ -43,23 +43,35 @@ ENDFOREACH()
ADD_CUSTOM_TARGET(generate_idl_cpp DEPENDS ${ALL_IDL_CPP_STUBS})
ADD_CUSTOM_TARGET(generate_idl_python DEPENDS ${ALL_IDL_PYTHON_STUBS})
SET(LIBRARY_NAME ${PROJECT_NAME})
ADD_LIBRARY(${LIBRARY_NAME}
SHARED
server.cc
problem.impl.hh
problem.impl.cc
${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/wholebody-step/problemSK.cc
)
IF (NOT CLIENT_ONLY)
SET(LIBRARY_NAME ${PROJECT_NAME})
ADD_LIBRARY(${LIBRARY_NAME}
SHARED
server.cc
problem.impl.hh
problem.impl.cc
${CMAKE_CURRENT_BINARY_DIR}/hpp/corbaserver/wholebody-step/problemSK.cc
)
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_cpp)
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_python)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-wholebody-step)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-template-corba)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_cpp)
ADD_DEPENDENCIES (${LIBRARY_NAME} generate_idl_python)
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-wholebody-step)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-template-corba)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
# Standalone corba server
ADD_EXECUTABLE (hpp-wholebody-step-server hpp-wholebody-step-corba.cc)
TARGET_LINK_LIBRARIES (hpp-wholebody-step-server ${LIBRARY_NAME})
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-wholebody-step)
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-corbaserver)
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-template-corba)
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-util)
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL (TARGETS hpp-wholebody-step-server DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF (NOT CLIENT_ONLY)
INSTALL(
FILES
......@@ -71,13 +83,3 @@ INSTALL(
${CMAKE_CURRENT_SOURCE_DIR}/hpp/corbaserver/wholebody_step/client.py
DESTINATION ${PYTHON_SITELIB}/hpp/corbaserver/wholebody_step
)
# Standalone corba server
ADD_EXECUTABLE (hpp-wholebody-step-server hpp-wholebody-step-corba.cc)
TARGET_LINK_LIBRARIES (hpp-wholebody-step-server ${LIBRARY_NAME})
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-wholebody-step)
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-corbaserver)
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-template-corba)
PKG_CONFIG_USE_DEPENDENCY(hpp-wholebody-step-server hpp-util)
INSTALL (TARGETS hpp-wholebody-step-server DESTINATION ${CMAKE_INSTALL_BINDIR})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment