#-------------------------------------------------------------------------------
#
# CMake file for the autogenerated C++ code for the robot HyQ
#
# ADVanced Robotics department (ADVR)
# Fondazione Istituto Italiano di Tecnologia
#
# Author: Marco Frigerio
# Note: this file has been generated by the Robotics Code Generator.
#       Do not edit unless you know what you are doing.
#-------------------------------------------------------------------------------

# Project configuration
cmake_minimum_required(VERSION 2.8)
project(gen_hyq)

set(EIGEN_ROOT   $ENV{EIGEN_ROOT}   CACHE PATH "Path to Eigen headers")
set(IIT_RBD_ROOT $ENV{IIT_RBD_ROOT} CACHE PATH "Path to iit-rbd headers")
set(HEADER_INSTALL_ROOT /usr/local/include/ CACHE PATH "Where to install HyQ headers")
set(LIB_INSTALL_ROOT /usr/local/lib/ CACHE PATH "Where to install HyQ library")

SET(CMAKE_CXX_FLAGS "-g -Wall -O3 -march=native -mtune=native -D EIGEN_NO_DEBUG")

set(LIB_NAME iitgenhyq)

set(HEADERS ./declarations.h
            ./link_data_map.h
            ./joint_data_map.h
            ./transforms.h
            ./kinematics_parameters.h
            ./jacobians.h
            ./traits.h
            ./jsim.h
            ./inverse_dynamics.h
            ./forward_dynamics.h
            ./inertia_properties.h
            ./dynamics_parameters.h
            ./miscellaneous.h)
set(SOURCES ./miscellaneous.cpp)
            

# Include directories
include_directories(${EIGEN_ROOT})
include_directories(${IIT_RBD_ROOT})

# Add library
add_library(${LIB_NAME} SHARED ${SOURCES})

# Install (ie copy) header files
install(FILES ${HEADERS} DESTINATION ${HEADER_INSTALL_ROOT}/iit/robots/hyq/)

# Install the shared library
install(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${LIB_INSTALL_ROOT})
