Commit 6d0b4a00 authored by Francois Bleibel's avatar Francois Bleibel
Browse files

Changed CMakeLists to cope for the new headers location.

Renamed dynamic-graph-API.h to dynamic-graph-api.h in every header file.
parent 4c343811
### Get the headers paths
SET(include_list "${CMAKE_CURRENT_SOURCE_DIR}/dynamic-graph-API.h")
FILE(GLOB_RECURSE headers_list
${PROJECT_SOURCE_DIR}/src/*.h
)
FILE(GLOB_RECURSE templates_list
${PROJECT_SOURCE_DIR}/src/*.t.cpp
SET(${PROJECT_NAME}_HEADERS
contiifstream.h
debug.h
dynamic-graph-api.h
entity.h
factory.h
interpreter.h
plugin-loader.h
pool.h
exception-abstract.h
exception-factory.h
exception-signal.h
shell-functions.h
shell-procedure.h
signal.h
signal-array.h
signal-base.h
signal-ptr.h
signal-time-dependant.h
signal-ptr.t.cpp
signal.t.cpp
time-dependency.h
time-dependency.t.cpp
)
LIST(APPEND include_list ${headers_list})
LIST(APPEND include_list ${templates_list})
### Copy headers to include directories
SET(HEADER_IN_INCLUDE_DIR "")
FOREACH(header ${include_list})
GET_FILENAME_COMPONENT(headerName ${header} NAME)
ADD_CUSTOM_COMMAND(
OUTPUT ${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${headerName}
COMMAND ${CMAKE_COMMAND} -E copy ${header}
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${headerName}
)
INSTALL(FILES
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${headerName}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
SET(HEADER_IN_INCLUDE_DIR ${HEADER_IN_INCLUDE_DIR}
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${headerName})
ENDFOREACH(header)
### Create a top level rule to copy all the headers from src to include/dynamic-graph
ADD_CUSTOM_TARGET(headers ALL
DEPENDS ${HEADER_IN_INCLUDE_DIR})
### Dependency of the main library on the headers
ADD_DEPENDENCIES(${PROJECT_NAME}
headers)
# Recreate correct path for the headers
#--------------------------------------
SET(fullpath_${PROJECT_NAME}_HEADERS)
FOREACH(lHeader ${${PROJECT_NAME}_HEADERS})
SET(fullpath_${PROJECT_NAME}_HEADERS
${fullpath_${PROJECT_NAME}_HEADERS}
./${PROJECT_NAME}/${lHeader}
)
ENDFOREACH(lHeader)
#----------------------------------------------------
# Install procedure for the header files
#----------------------------------------------------
INSTALL(FILES ${fullpath_${PROJECT_NAME}_HEADERS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
)
\ No newline at end of file
......@@ -42,7 +42,7 @@
#include <fstream>
#include <sstream>
#include <stdarg.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
/* -------------------------------------------------------------------------- */
......
......@@ -30,7 +30,7 @@
#include <dynamic-graph/signal-base.h>
#include <dynamic-graph/exception-factory.h>
#include <dynamic-graph/signal-array.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
/* --- STD --- */
#include <string>
......
......@@ -29,7 +29,7 @@
/* Classes standards. */
#include <iostream> /* Classe ostream. */
#include <string> /* Classe string. */
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
// Uncomment this macros to have lines parameter on the throw display
......
......@@ -27,7 +27,7 @@
#include <dynamic-graph/exception-abstract.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
......
......@@ -27,7 +27,7 @@
#include <dynamic-graph/exception-abstract.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
......
......@@ -32,7 +32,7 @@
/* --- SOT --- */
#include <dynamic-graph/exception-factory.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
namespace dynamicgraph {
......
......@@ -30,7 +30,7 @@
#include <dynamic-graph/signal-base.h>
#include <dynamic-graph/exception-factory.h>
#include <dynamic-graph/pool.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
/* --- STD --- */
#include <string>
......
......@@ -33,7 +33,7 @@
/* --- SOT --- */
#include <dynamic-graph/exception-factory.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
namespace dynamicgraph {
......
......@@ -32,7 +32,7 @@
/* --- SOT --- */
#include <dynamic-graph/exception-factory.h>
#include <dynamic-graph/signal-base.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
namespace dynamicgraph
{
......
......@@ -24,7 +24,7 @@
#define __SIGNAL_ARRAY_HH
#include <dynamic-graph/signal-base.h>
#include <dynamic-graph/dynamic-graph-API.h>
#include <dynamic-graph/dynamic-graph-api.h>
namespace dynamicgraph {
......
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