Commit 5e95cff4 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

packaging

parent cd85b7de
......@@ -23,45 +23,27 @@ SET(CXX_DISABLE_WERROR TRUE)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
#INCLUDE(cmake/cpack.cmake)
INCLUDE(cmake/test.cmake)
INCLUDE(cmake/hpp.cmake)
SET(PROJECT_ORG humanoid-path-planner)
SET(PROJECT_NAME hpp-affordance)
SET(PROJECT_DESCRIPTION
"Implementation to Extract Whole-Body Affordances for Mutli-Contact Planning."
)
SET(PROJECT_URL "")
# Where to compile shared objects
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
SETUP_PROJECT()
# Activate hpp-util logging if requested
SET (HPP_DEBUG FALSE CACHE BOOL "trigger hpp-affordance debug output")
IF (HPP_DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
ENDIF()
# Declare headers
SET(${PROJECT_NAME}_HEADERS
include/hpp/affordance/fwd.hh
include/hpp/affordance/affordance-extraction.hh
include/hpp/affordance/operations.hh
)
# Declare dependencies
SEARCH_FOR_BOOST()
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2")
ADD_REQUIRED_DEPENDENCY("hpp-fcl >= 0.2.9")
## Add dependency toward hpp-affordance library in pkg-config file.
PKG_CONFIG_APPEND_LIBS("hpp-affordance")
ADD_SUBDIRECTORY(include/hpp/affordance)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
CONFIG_FILES (include/hpp/affordance/doc.hh)
SETUP_PROJECT_FINALIZE()
#SETUP_PROJECT_CPACK()
Subproject commit 7cdd2146508a3431adb8e5a0d4233704080299cd
Subproject commit 320c636960b03b3bad7c7a08bd2e104951f42bc3
SET(${PROJECT_NAME}_HEADERS
fwd.hh
affordance-extraction.hh
operations.hh
)
......@@ -14,13 +14,7 @@
# hpp-affordance. If not, see <http://www.gnu.org/licenses/>.
SET(LIBRARY_NAME ${PROJECT_NAME})
ADD_LIBRARY(${LIBRARY_NAME}
SHARED
${PROJECT_SOURCE_DIR}/include/hpp/affordance/fwd.hh
${PROJECT_SOURCE_DIR}/include/hpp/affordance/affordance-extraction.hh
${PROJECT_SOURCE_DIR}/include/hpp/affordance/operations.hh
affordance-extraction.cc
)
ADD_LIBRARY(${LIBRARY_NAME} SHARED affordance-extraction.cc)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-fcl)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigen3)
......
......@@ -15,43 +15,20 @@
# You should have received a copy of the GNU Lesser General Public License
# along with hpp-affordance If not, see <http://www.gnu.org/licenses/>.
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
# Make Boost.Test generates the main function in test cases.
#ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
# ADD_TESTCASE(NAME)
# ------------------------
#
# Define a test named `NAME'.
#
# This macro will create a binary from `NAME.cc', link it against
# Boost and add it to the test suite.
#
macro(add_testcase NAME GENERATED)
IF (${GENERATED} STREQUAL TRUE)
add_executable(${NAME} ${CMAKE_CURRENT_BINARY_DIR}/${NAME.cc)
ELSE()
add_executable(${NAME} ${NAME}.cc)
ENDIF()
add_test(${NAME} ${RUNTIME_OUTPUT_DIRECTORY}/${NAME})
PKG_CONFIG_USE_DEPENDENCY(${NAME} hpp-fcl)
PKG_CONFIG_USE_DEPENDENCY(${NAME} eigen3)
target_link_libraries(${NAME}
${Boost_LIBRARIES}
${PROJECT_NAME}
hpp-affordance
)
endmacro(add_testcase)
# add_affordance_test(test-create-mesh test-create-mesh.cc)
# add_affordance_test(test-create-affordance test-main3.cc)
SET(${PROJECT_NAME}_TESTS
operations
one-triangle1
one-triangle2
oriented-triangles1
oriented-triangles2
)
add_testcase (test-operations FALSE)
add_testcase (test-one-triangle1 FALSE)
add_testcase (test-one-triangle2 FALSE)
add_testcase (test-oriented-triangles1 FALSE)
add_testcase (test-oriented-triangles2 FALSE)
FOREACH(test ${${PROJECT_NAME}_TESTS})
ADD_UNIT_TEST(${test} "test-${test}")
PKG_CONFIG_USE_DEPENDENCY(${test} hpp-fcl)
PKG_CONFIG_USE_DEPENDENCY(${test} eigen3)
target_link_libraries(${test} ${Boost_LIBRARIES} ${PROJECT_NAME})
ENDFOREACH(test)
Markdown is supported
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