Commit 21dd6370 authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Merge branch 'release_1.16.0' into 'master'

Release 1.16.0

See merge request robotran/mbsysc!414
parents a6d4f38c c82cba0f
...@@ -76,13 +76,16 @@ coman_mbsysC: ...@@ -76,13 +76,16 @@ coman_mbsysC:
stage: test_Dev stage: test_Dev
allow_failure: true allow_failure: true
before_script: before_script:
- apt update - apt-get update
- apt install -y git - apt-get install -y git
- git submodule sync --recursive - git submodule sync --recursive
- git stash
- git submodule update --init --recursive - git submodule update --init --recursive
script: script:
- mkdir ExampleProjects/coman_robot/workR/build - mkdir ExampleProjects/coman_robot/workR/build
- cd ExampleProjects/coman_robot/workR/build - cd /builds/robotran/mbsysc/MBsysC/build/bin
- ./Gen_mds_user "/builds/robotran/mbsysc/ExampleProjects/coman_robot/dataR/coman.mbs" "user_models"
- cd /builds/robotran/mbsysc/ExampleProjects/coman_robot/workR/build
- cmake -DROBOTRAN_SOURCE_DIR=$(pwd)/../../../../MBsysC -DFLAG_RELEASE=OFF .. - cmake -DROBOTRAN_SOURCE_DIR=$(pwd)/../../../../MBsysC -DFLAG_RELEASE=OFF ..
- make - make
- ./exe_projectRobotran - ./exe_projectRobotran
...@@ -90,6 +93,7 @@ coman_mbsysC: ...@@ -90,6 +93,7 @@ coman_mbsysC:
- rm -r ExampleProjects/coman_robot/workR/build # need to manually clean folder for gitlab-ci with submodule - rm -r ExampleProjects/coman_robot/workR/build # need to manually clean folder for gitlab-ci with submodule
only: only:
- dev - dev
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Testing PendulumSpringC Example project # Testing PendulumSpringC Example project
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -694,6 +698,11 @@ doc: ...@@ -694,6 +698,11 @@ doc:
image: immc/robotran-cross:v1.11 image: immc/robotran-cross:v1.11
stage: build stage: build
script : script :
- mkdir MBsysC/build
- cd MBsysC/build
- cmake ..
- make
- cd ../..
- cd MBsysC/mbs_interface/MBsysPy/doc - cd MBsysC/mbs_interface/MBsysPy/doc
- sphinx-apidoc -o source/ ../../ -f -e - sphinx-apidoc -o source/ ../../ -f -e
- sphinx-apidoc -o source/ ../../MBsysPy/templates/user -f -e - sphinx-apidoc -o source/ ../../MBsysPy/templates/user -f -e
...@@ -726,7 +735,7 @@ pages: ...@@ -726,7 +735,7 @@ pages:
paths: paths:
- public - public
only: only:
- dev - master
#before_script: #before_script:
# - eval $(ssh-agent -s) # - eval $(ssh-agent -s)
......
## Changes for next release ## Changes for next release
* To be defined * To be defined
## Robotran v1.16.0
* [C][Python] error handling is enhanced, with new error names and proper closing of the functions for all modules, except Real-time in dirdyn
* [C] All user models are printed with the `mbs_print_data` function
* [C] New function `print_d_vec_0_format` allowing to set the format of the vector values.
* [C] New function to compute matrix product between matrices of specified shape: `doublematrix_product_0`.
* [C] LPK functions new error catched with code `-#16`; Documentation fixed.
* [C] Some functions that my be called by users have return status (<0 in case of error):
* Look Up Table: `mbs_lut_2D_alloc()`, `mbs_lut_res_alloc()`, `mbs_lut_res_load_file()`;
* Useful functions: `read_dmat_0()`
* [Py] User vector outputs are now available in the MbsDirdyn results field.
* [Py] Using C symbolic library and Python user is possible even with external forces.
* [Py] Adding missing fields in MbsData.
* [dirdyn][new option] A new option option called 'oneshot' is added.
-> It allows to compute the derivative function only once (no time derivation) at time = dt0.
-> See the 'flag_oneshot' in dirdyn options.
* [dirdyn][Fix] the function user_dirdyn_loop is now called only at the real time steps, even for multisteps integration methods.
* [dirdyn][Fix] the mbs_data->flag_stop is taken into account in all the integrators now, the simulation stops.
* [integrators][dirdyn] Add a new integrator called 'AlphaM' for alpha method. It is explicit, fixed step-size but with two stages and a bit smarter than Euler explicit :-)
## Robotran v1.14.3 ## Robotran v1.14.3
* [Python] Fix in MbsSensor class: * [Python] Fix in MbsSensor class:
* bad call to `comp_s_sensor` in `comp_f_sensor` raising exception. * bad call to `comp_s_sensor` in `comp_f_sensor` raising exception.
## Robotran v1.14.2 ## Robotran v1.14.2
* [Python] Fixes in MbsSensor class: * [Python] Fixes in MbsSensor class:
* bad field called in `comp_f_sensor` raising exception. * bad field called in `comp_f_sensor` raising exception.
* bad field called in `assign_to_C` raising exception when assigning an existing Python sensor to an existing C structure. * bad field called in `assign_to_C` raising exception when assigning an existing Python sensor to an existing C structure.
* with C symbolic libraries computing `force` or `gen` sensor was wrong as the class calls for the Python function. * with C symbolic libraries computing `force` or `gen` sensor was wrong as the class calls for the Python function.
* `gen_sensor` function is renamed to `comp_gen_sensor` (coherence with other sensors). * `gen_sensor` function is renamed to `comp_gen_sensor` (coherence with other sensors).
## Robotran v1.14.1 ## Robotran v1.14.1
* [Python] Correct Python project templates in main.py (plot error) and user_ExtForces (index error) * [Python] Correct Python project templates in main.py (plot error) and user_ExtForces (index error)
* **Requires to upate template of existing projects in Python created with v 1.14.0** * **Requires to upate template of existing projects in Python created with v 1.14.0**
...@@ -45,9 +70,11 @@ ...@@ -45,9 +70,11 @@
* [New] Changing user state ids is now forbidden. * [New] Changing user state ids is now forbidden.
* [Template] user_ExtForces documentation improved. * [Template] user_ExtForces documentation improved.
* [DEV] files updated to respect pep8 (except for E116, E126, E127, E402, E501, E722, E743, W503, W504) * [DEV] files updated to respect pep8 (except for E116, E126, E127, E402, E501, E722, E743, W503, W504)
* [DOC] files updated to respect numpydoc style (with spyder 4 lining)
* [DOC] files updated to respect numpydoc style (with spyder 4 lining)
* [Simulink] Inverse dynamics module added, basic use.
*
* [ROS] compatibility with ROS in UNIX OS is done. Path to open GL process is put to catkin_ws. * [ROS] compatibility with ROS in UNIX OS is done. Path to open GL process is put to catkin_ws.
Functions used in main are put as extern cpp to be compiled by ROS environment. Functions used in main are put as extern cpp to be compiled by ROS environment.
See the ROS tutorial on www.robotran.be for more informations See the ROS tutorial on www.robotran.be for more informations
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX) if (UNIX)
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.4)
else() else()
cmake_minimum_required(VERSION 3.4) cmake_minimum_required(VERSION 3.4)
endif () endif ()
...@@ -95,7 +95,7 @@ endif() ...@@ -95,7 +95,7 @@ endif()
# MBSysC libraries # MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED ) find_package( LibRobotranC 1.16.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS}) add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(${SYMBOLIC_LIB_NAME} ${LIB_MBSYSC_MODULES}) target_link_libraries(${SYMBOLIC_LIB_NAME} ${LIB_MBSYSC_MODULES})
endif() endif()
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX) if (UNIX)
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.4)
else() else()
cmake_minimum_required(VERSION 3.4) cmake_minimum_required(VERSION 3.4)
endif () endif ()
...@@ -140,7 +140,7 @@ endif() ...@@ -140,7 +140,7 @@ endif()
# MBSysC libraries # MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED ) find_package( LibRobotranC 1.16.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS}) add_definitions(${LIB_MBSYSC_DEFINITIONS})
endif() endif()
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# CMake minimum version # CMake minimum version
if (UNIX) if (UNIX)
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.4)
else() else()
cmake_minimum_required(VERSION 3.4) cmake_minimum_required(VERSION 3.4)
endif () endif ()
...@@ -175,7 +175,7 @@ flags_clean() ...@@ -175,7 +175,7 @@ flags_clean()
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_path(LibRobotranC_DIR LibRobotranCConfig.cmake "${ROBOTRAN_SOURCE_DIR}/build") find_path(LibRobotranC_DIR LibRobotranCConfig.cmake "${ROBOTRAN_SOURCE_DIR}/build")
find_package( LibRobotranC 1.14.0 REQUIRED ) find_package( LibRobotranC 1.16.0 REQUIRED )
target_link_libraries( ${Executable} ${LIB_MBSYSC_MODULES} ${LIB_MBSYSC_LOAD} ${LIB_MBSYSC_UTILITIES} ) target_link_libraries( ${Executable} ${LIB_MBSYSC_MODULES} ${LIB_MBSYSC_LOAD} ${LIB_MBSYSC_UTILITIES} )
add_definitions(${LIB_MBSYSC_DEFINITIONS}) add_definitions(${LIB_MBSYSC_DEFINITIONS})
......
# #
# Universite catholique de Louvain # Universite catholique de Louvain
# CEREM : Centre for research in mechatronics # CEREM : Centre for research in mechatronics
# http://www.robotran.be # http://www.robotran.be
# Contact : info@robotran.be # Contact : info@robotran.be
# #
# #
# CMake for compiling the symbolic files of a robotran project in C # CMake for compiling the symbolic files of a robotran project in C
# #
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LIBRARY MAIN CONFIGURATIONS # LIBRARY MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX) if (UNIX)
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.4)
else() else()
cmake_minimum_required(VERSION 3.4) cmake_minimum_required(VERSION 3.4)
endif () endif ()
project(Project_symbolic) project(Project_symbolic)
# flags # flags
if (UNIX) if (UNIX)
set(CMAKE_C_FLAGS "-fPIC") set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC") set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX) endif (UNIX)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SEPARATE COMPILATION # SEPARATE COMPILATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if ( FLAG_SEPARATE_SYMBOLIC ) if ( FLAG_SEPARATE_SYMBOLIC )
set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux) set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux)
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux) set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ ) add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ ) add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
endif ( ) endif ( )
# release of debug # release of debug
release_debug() release_debug()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SET LIBRARY # SET LIBRARY
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# list source files to compile # list source files to compile
init_src() init_src()
increment_src( ${PROJECT_SOURCE_DIR} ) increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_symbolic( ${PROJECT_SOURCE_DIR} ) increment_void_symbolic( ${PROJECT_SOURCE_DIR} )
# list include directories (to find headers) # list include directories (to find headers)
init_include() init_include()
increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common ) increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common )
# include these directories # include these directories
include_directories ( ${INCLUDE_DIR} ) include_directories ( ${INCLUDE_DIR} )
include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(Project_symbolic SHARED ${SOURCE_FILES}) add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib # MacOS: Force extension to be .so rather than .dylib
if(APPLE) if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so) set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif() endif()
# Windows, copy dll next to executable # Windows, copy dll next to executable
if((NOT UNIX) AND (NOT FLAG_SEPARATE_SYMBOLIC)) if((NOT UNIX) AND (NOT FLAG_SEPARATE_SYMBOLIC))
add_custom_command(TARGET Project_symbolic POST_BUILD add_custom_command(TARGET Project_symbolic POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/Project_symbolic.dll ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/Project_symbolic.dll
${CMAKE_CURRENT_BINARY_DIR}/../$<CONFIGURATION>/Project_symbolic.dll ${CMAKE_CURRENT_BINARY_DIR}/../$<CONFIGURATION>/Project_symbolic.dll
) )
endif() endif()
else() else()
add_library(Project_symbolic STATIC ${SOURCE_FILES}) add_library(Project_symbolic STATIC ${SOURCE_FILES})
# some symbolic routines call user functions (ext_forces, accelred, ...) # some symbolic routines call user functions (ext_forces, accelred, ...)
target_link_libraries(Project_symbolic Project_userfct) target_link_libraries(Project_symbolic Project_userfct)
endif() endif()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LINK LIBRARIES # LINK LIBRARIES
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# MBSysC libraries # MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED ) find_package( LibRobotranC 1.16.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS}) add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(Project_symbolic ${LIB_MBSYSC_MODULES}) target_link_libraries(Project_symbolic ${LIB_MBSYSC_MODULES})
endif() endif()
# Windows M_PI definitions # Windows M_PI definitions
if (WIN32) if (WIN32)
add_definitions(-D _USE_MATH_DEFINES) add_definitions(-D _USE_MATH_DEFINES)
endif (WIN32) endif (WIN32)
# #
# Universite catholique de Louvain # Universite catholique de Louvain
# CEREM : Centre for research in mechatronics # CEREM : Centre for research in mechatronics
# http://www.robotran.be # http://www.robotran.be
# Contact : info@robotran.be # Contact : info@robotran.be
# #
# #
# CMake for compiling the user files of a robotran project in C # CMake for compiling the user files of a robotran project in C
# #
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LIBRARY MAIN CONFIGURATIONS # LIBRARY MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX) if (UNIX)
cmake_minimum_required(VERSION 2.8.7) cmake_minimum_required(VERSION 3.4)
else() else()
cmake_minimum_required(VERSION 3.4) cmake_minimum_required(VERSION 3.4)
endif () endif ()
project(Project_userfct) project(Project_userfct)
# flags # flags
if (UNIX) if (UNIX)
set(CMAKE_C_FLAGS "-fPIC") set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC") set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX) endif (UNIX)
# Windows M_PI definitions # Windows M_PI definitions
if (WIN32) if (WIN32)
add_definitions(-D _USE_MATH_DEFINES) add_definitions(-D _USE_MATH_DEFINES)
endif (WIN32) endif (WIN32)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SEPARATE COMPILATION # SEPARATE COMPILATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if ( FLAG_SEPARATE_USER_FCT ) if ( FLAG_SEPARATE_USER_FCT )
# additional CMakeLists.txt # additional CMakeLists.txt
set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux) set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux)
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux) set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ ) add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ ) add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
add_subdirectory ( ${CMAKE_AUX}/libraries/ ${CMAKE_AUX_BIN}/libraries/ ) add_subdirectory ( ${CMAKE_AUX}/libraries/ ${CMAKE_AUX_BIN}/libraries/ )
# real-time option # real-time option
option (FLAG_REAL_TIME "Real time" OFF) option (FLAG_REAL_TIME "Real time" OFF)
if(FLAG_REAL_TIME) if(FLAG_REAL_TIME)
add_definitions( -DREAL_TIME ) add_definitions( -DREAL_TIME )
# configure a header file to pass some of the CMake settings to the source code # configure a header file to pass some of the CMake settings to the source code
configure_file ( configure_file (
"${ROBOTRAN_SOURCE_DIR}/conf/cmake_config.h.in" "${ROBOTRAN_SOURCE_DIR}/conf/cmake_config.h.in"
"${PROJECT_BINARY_DIR}/conf/cmake_config.h" "${PROJECT_BINARY_DIR}/conf/cmake_config.h"
) )
include_directories (${PROJECT_BINARY_DIR}/conf) include_directories (${PROJECT_BINARY_DIR}/conf)
# plot-visu options # plot-visu options
option (FLAG_PLOT "Real time" OFF) option (FLAG_PLOT "Real time" OFF)
option (FLAG_VISU "Real time" OFF) option (FLAG_VISU "Real time" OFF)
option (FLAG_JAVA "Real time" OFF) option (FLAG_JAVA "Real time" OFF)
option (FLAG_OPEN_GL "Real time" OFF) option (FLAG_OPEN_GL "Real time" OFF)
if(FLAG_PLOT) if(FLAG_PLOT)
add_definitions( -DSDL ) add_definitions( -DSDL )
endif( ) endif( )
if(FLAG_VISU) if(FLAG_VISU)
add_definitions( -DVISU_3D ) add_definitions( -DVISU_3D )
endif( ) endif( )
if(FLAG_JAVA) if(FLAG_JAVA)
add_definitions( -DJAVA ) add_definitions( -DJAVA )
endif( ) endif( )
if(FLAG_OPEN_GL) if(FLAG_OPEN_GL)
add_definitions( -DOPEN_GL ) add_definitions( -DOPEN_GL )
endif( ) endif( )
endif ( ) endif ( )
endif ( ) endif ( )
# release of debug # release of debug
release_debug() release_debug()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SET LIBRARY # SET LIBRARY
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# list source files to compile # list source files to compile
init_src() init_src()
increment_src( ${PROJECT_SOURCE_DIR} ) increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_user( ${PROJECT_SOURCE_DIR} ) increment_void_user( ${PROJECT_SOURCE_DIR} )
# list include directories (to find headers) # list include directories (to find headers)
init_include() init_include()
increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common ) increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common )
# include these directories # include these directories
include_directories ( ${INCLUDE_DIR} ) include_directories ( ${INCLUDE_DIR} )
include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT ) if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(Project_userfct SHARED ${SOURCE_FILES}) add_library(Project_userfct SHARED ${SOURCE_FILES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME}) target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${