Commit 59bcc85e authored by Nicolas Van der Noot's avatar Nicolas Van der Noot
Browse files

scripts compilation

parent d809b962
......@@ -47,12 +47,16 @@ set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
add_subdirectory ( ${CMAKE_AUX}/libraries/ ${CMAKE_AUX_BIN}/libraries/ )
add_subdirectory ( ${CMAKE_AUX}/make_opt/ ${CMAKE_AUX_BIN}/make_opt/ )
# MBsysC files to compile
if (NOT FLAG_SEPARATE_BUILD)
add_subdirectory( ${ROBOTRAN_SOURCE_DIR}/mbs_common ${CMAKE_CURRENT_BINARY_DIR}/mbs_common )
endif ( )
# make options
make_options()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# FLAGS RELATED FUNCTIONS
......@@ -147,12 +151,28 @@ if (FLAG_SEPARATE_BUILD) # find MBSysC dynamic libraries
find_package( LibRobotranC REQUIRED )
target_link_libraries( ${Executable} ${LIB_MBSYSC_MODULES} ${LIB_MBSYSC_LOAD} ${LIB_MBSYSC_UTILITIES} )
else ( ) # find MBSysC static libraries
else ( )
target_link_libraries( ${Executable} MBsysC_loadXML MBsysC_module )
if (NOT FLAG_SHARED_LIB)
target_link_libraries( ${Executable} MBsysC_struct MBsysC_numerics MBsysC_utilities MBsysC_realtime )
if (NOT FLAG_SHARED_LIB)
# find MBSysC static libraries
target_link_libraries( ${Executable} MBsysC_struct MBsysC_numerics MBsysC_realtime MBsysC_utilities )
#Libxml2 and GSL external libraries
target_link_libraries ( ${Executable} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES} )
# SDL external library
if (FLAG_PLOT)
target_link_libraries ( ${Executable} ${SDL2_LIBRARIES} ${SDL2TTF_LIBRARIES} )
endif ( )
# Java external library
if (FLAG_VISU)
target_link_libraries ( ${Executable} ${JNI_LIBRARIES} )
endif ( )
endif ( )
endif ( )
......@@ -161,16 +181,3 @@ endif ( )
if (UNIX)
target_link_libraries ( ${Executable} m )
endif ( )
#Libxml2 and GSL external libraries
target_link_libraries ( ${Executable} ${LIBXML2_LIBRARIES} ${GSL_LIBRARIES} )
# SDL external library
if (FLAG_PLOT)
target_link_libraries ( ${Executable} ${SDL2_LIBRARIES} ${SDL2TTF_LIBRARIES} )
endif ( )
# Java external library
if (FLAG_VISU)
target_link_libraries ( ${Executable} ${JNI_LIBRARIES} )
endif ( )
#
# Author: Nicolas Van der Noot
# September 2015
#
# Make options functions
#
# Make options
function(make_options)
set( SCRIPTS_PATH ${ROBOTRAN_SOURCE_DIR}/cmake_aux/scripts )
add_custom_target(separate_build COMMAND ${CMAKE_COMMAND} -P ${SCRIPTS_PATH}/separate_build_options )
add_custom_target(dyn_basic COMMAND ${CMAKE_COMMAND} -P ${SCRIPTS_PATH}/separate_build_basic ${ROBOTRAN_SOURCE_DIR} )
endfunction()
# ${PROJECT_SOURCE_DIR} ${ROBOTRAN_SOURCE_DIR}
#
# Author: Nicolas Van der Noot
# September 2015
#
# Separate build: basic compilation options
#
# MBsysC files
set ( MBSYSC_DIR ${CMAKE_ARGV3} )
# remove possible directory
file( REMOVE_RECURSE ${MBSYSC_DIR}/build )
# create empty build folder
file( MAKE_DIRECTORY ${MBSYSC_DIR}/build )
#
# Author: Nicolas Van der Noot
# September 2015
#
# Separate build configuration
#
message("")
message("Use the following commands to generate the dynamic MBsysC libraries:")
message("")
message(" * make dyn_basic -> basic compilation options")
message(" * make dyn_plot -> real-time graphs available")
message(" * make dyn_visu -> real-time visualization availbale")
message(" * make dyn_realtime -> all real-time features available")
message("")
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