Commit 34b016c8 authored by Timothee Habra's avatar Timothee Habra
Browse files

mbs_realtime separate build

parent adbce541
......@@ -78,7 +78,7 @@
*/
void user_realtime_options(Realtime_option *options)
{
options->mbs_file = PROJECT_SOURCE_DIR"/../dataR/"MBS_NAME".mbs";
}
#endif
......@@ -121,7 +121,7 @@ increment_src("${PROJECT_SOURCE_DIR}/../symbolicR")
#increment_src("${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_module")
#increment_src("${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_numerics")
#increment_src("${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_utilities")
increment_src("${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_realtime")
#increment_src("${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_realtime")
# list include directories (to find headers)
......
......@@ -9,6 +9,6 @@
*/
#define PROJECT_SOURCE_DIR "@PROJECT_SOURCE_DIR@"
#define PROJECT_BINARY_DIR "@PROJECT_BINARY_DIR@"
#define ROBOTRAN_SOURCE_DIR "@ROBOTRAN_SOURCE_DIR@"
#define J3D_PATH "@J3D_PATH@"
//#define ROBOTRAN_SOURCE_DIR "@ROBOTRAN_SOURCE_DIR@"
//#define J3D_PATH "@J3D_PATH@"
#define MBS_NAME "@MBS_NAME@"
......@@ -33,3 +33,4 @@ add_subdirectory (mbs_struct/ ${CMAKE_CURRENT_BINARY_DIR}/mbs_struct/)
add_subdirectory (mbs_utilities/ ${CMAKE_CURRENT_BINARY_DIR}/mbs_utilities/)
add_subdirectory (mbs_load_xml/ ${CMAKE_CURRENT_BINARY_DIR}/mbs_load_xml/)
add_subdirectory (mbs_module/ ${CMAKE_CURRENT_BINARY_DIR}/mbs_module/)
add_subdirectory (mbs_realtime/ ${CMAKE_CURRENT_BINARY_DIR}/mbs_realtime/)
\ No newline at end of file
......@@ -19,7 +19,7 @@ set(INCLUDE_DIR ${INCLUDE_DIR} "./" PARENT_SCOPE)
add_library(MBsysC_module SHARED ${SOURCE_FILES} ${INCLUDE_DIR})
target_link_libraries(MBsysC_module MBsysC_struct MBsysC_numerics MBsysC_utilities)
target_link_libraries(MBsysC_module MBsysC_struct MBsysC_numerics MBsysC_utilities MBsysC_realtime)
include_directories(../mbs_struct)
include_directories(../mbs_numerics)
......
# Copyright: (C)
# Authors: Timothee Habra
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
cmake_minimum_required(VERSION 2.8.9)
project(MBsysC_realtime)
# list source files to compile
init_src()
increment_src(./realtime)
# Get SDL lib and add plot functions to src
if (FLAG_PLOT)
# Find SDL
sdl_lib()
increment_src(./sdl)
# configure a header file to pass some of the CMake settings to the source code
set(SDL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/sdl/SDL_files)
configure_file (
"./sdl/conf/cmake_sdl_config.h.in"
"${PROJECT_BINARY_DIR}/conf/cmake_sdl_config.h"
)
include_directories ("${PROJECT_BINARY_DIR}/conf")
endif (FLAG_PLOT)
# Get java lib and add java functions to src
if (FLAG_VISU)
# find java and java 3d
java_lib()
include_directories("./java")
increment_src(./java)
set(JAR_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../mbsyspad/MBsysPad.jar)
configure_file (
"./java/conf/cmake_java_config.h.in"
"${PROJECT_BINARY_DIR}/conf/cmake_java_config.h"
)
include_directories ("${PROJECT_BINARY_DIR}/conf")
endif (FLAG_VISU)
# list include directories (to find headers)
init_include()
set(INCLUDE_DIR ${INCLUDE_DIR} "./realtime" PARENT_SCOPE)
add_library(MBsysC_realtime ${SOURCE_FILES} ${INCLUDE_DIR})
include_directories("./")
include_directories("../mbs_struct")
include_directories("../mbs_utilities")
include_directories("./sdl" "./sdl/auto_plot")
include_directories("./realtime")
\ No newline at end of file
/*
* author: Timothee Habra
* date: May 18 2015
*
* Get absolute paths to java and java 3d.
*
* A header file called 'cmake_java_config.h' is then automatically generated in the build directory
*/
#define JAR_PATH "@JAR_PATH@"
#define J3D_PATH "@J3D_PATH@"
......@@ -2,7 +2,7 @@
#ifdef JAVA
#include "java_functions.h"
#include "cmake_config.h"
#include "cmake_java_config.h"
#include <stdlib.h>
......@@ -10,7 +10,7 @@
#define JNI_VERSION JNI_VERSION_1_6
// path to the jar file containing mbsyspad bynary code
#define JAR_PATH ROBOTRAN_SOURCE_DIR"/mbsyspad/MBsysPad.jar"
//#define JAR_PATH ROBOTRAN_SOURCE_DIR"/mbsyspad/MBsysPad.jar"
#define START_VIEWPOINT 0 ///< default initial viewpoint
......
......@@ -3,7 +3,7 @@
#include "realtime.h"
#include "time_functions.h"
#include "cmake_config.h"
//#include "cmake_config.h"
#include "useful_functions.h"
#include <stdlib.h>
......@@ -313,7 +313,7 @@ Realtime_option* init_Realtime_option()
options->nb_q = 1; ///< number of joints in the .mbs used for visualization
// path and file name fot the .mbs file used for Java visualization
options->mbs_file = PROJECT_SOURCE_DIR"/../dataR/"MBS_NAME".mbs";
//options->mbs_file = PROJECT_SOURCE_DIR"/../dataR/"MBS_NAME".mbs";
options->start_viewpoint = 0; ///< initial visu viewpoint ID
options->nb_viewpoints = 1; ///< number of viewpoints (defined in .mbs)
......
/*
* author: Timothee Habra
* date: May 18 2015
*
* Get absolute paths to the SDL image.
*
* A header file called 'cmake_sdl_config.h' is then automatically generated in the build directory
*/
#define SDL_FILES_PATH "@SDL_FILES@"
......@@ -2,7 +2,6 @@
#ifdef SDL
#include "plot_sdl.h"
#include "visu_past.h"
#include "realtime.h"
#include "events_sdl.h"
#include "mbs_data.h"
......
......@@ -8,17 +8,17 @@
#include "useful_functions.h"
#include "plot_sdl.h"
#include "cmake_config.h"
#include "cmake_sdl_config.h"
#include "time_functions.h"
#include "events_sdl.h"
#include "set_plot.h"
#include "java_functions.h"
//#include "java_functions.h"
#include "realtime_functions.h"
#define TIME_NO_INTERACTION_BREAK 3e6 ///< time eith no interaction to go on break mode [us]
#define TIME_SDL_DELAY 25 ///< time delay for SDL
#define SDL_FILES_PATH ROBOTRAN_SOURCE_DIR"/mbs_common/mbs_realtime/sdl/SDL_files"
//#define SDL_FILES_PATH ROBOTRAN_SOURCE_DIR"/mbs_common/mbs_realtime/sdl/SDL_files"
/*! \brief initialize the Screen_sdl structure
*
......
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