Refining OptiTrack support vor VAMatlab, not yet ready though

parent cfc59659
......@@ -20,8 +20,16 @@ if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
set( ITA_VAMATLAB_SHOW_BANNER ON CACHE BOOL "Show VA banner on Matlab init" )
endif( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
if( NOT DEFINED ITA_MATLAB_DEPLOY_MATLAB_EXECUTABLE )
set( ITA_MATLAB_DEPLOY_MATLAB_EXECUTABLE ON CACHE BOOL "Install VAMatlab executable into deploy binary directory" )
if( NOT DEFINED ITA_VAMATLAB_DEPLOY_MATLAB_EXECUTABLE )
set( ITA_VAMATLAB_DEPLOY_MATLAB_EXECUTABLE ON CACHE BOOL "Install VAMatlab executable into deploy binary directory" )
endif( )
if( NOT DEFINED ITA_VAMATLAB_BUILD_WITH_OPTITRACK_TRACKING_SUPPORT )
set( ITA_VAMATLAB_BUILD_WITH_OPTITRACK_TRACKING_SUPPORT ON CACHE BOOL "Activate integrated OptiTrack tracking support" )
endif( )
if( NOT DEFINED ITA_VAMATLAB_POSTBUILD_CREATE_MATLAB_CLASS )
set( ITA_VAMATLAB_POSTBUILD_CREATE_MATLAB_CLASS OFF CACHE BOOL "Auto-create Matlab convenience class after build [for future use]" )
endif( )
vista_use_package( VABase REQUIRED FIND_DEPENDENCIES )
......@@ -47,7 +55,7 @@ if( NOT BUILD_SHARED_LIBS )
endif( )
if( ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
if( ITA_VAMATLAB_BUILD_WITH_INTERNAL_CORE )
vista_use_package( VACore REQUIRED FIND_DEPENDENCIES )
add_definitions( -DVAMATLAB_INTERNAL_CORE )
endif( )
......@@ -58,6 +66,9 @@ if( ITA_VAMATLAB_SHOW_BANNER )
add_definitions( -DVAMATLAB_SHOW_BANNER )
endif( )
if( ITA_VAMATLAB_BUILD_WITH_OPTITRACK_TRACKING_SUPPORT )
add_definitions( -DVAMATLAB_WITH_OPTITRACK )
endif( )
# Sources
set( VAMATLAB_SRC
......@@ -67,8 +78,10 @@ set( VAMATLAB_SRC
"src/VAMatlabConnection.cpp"
"src/VAMatlabConnection.h"
"src/VAMatlabExecutable.cpp"
"src/VAMatlabTracking.h"
"src/VAMatlabTracking.cpp" )
)
if( ITA_VAMATLAB_BUILD_WITH_OPTITRACK_TRACKING_SUPPORT )
list( APPEND VAMATLAB_SRC "src/VAMatlabTracking.h" "src/VAMatlabTracking.cpp" )
endif( )
add_library( VAMatlab SHARED ${VAMATLAB_SRC} VAMatlab.def )
target_link_libraries( VAMatlab ${VISTA_USE_PACKAGE_LIBRARIES} )
......@@ -85,7 +98,7 @@ vista_create_cmake_configs( VAMatlab )
set_property( TARGET VAMatlab PROPERTY FOLDER "VA/Bindings" )
set_target_properties( VAMatlab PROPERTIES SUFFIX ".${MATLAB_MEX_EXTENSION}")
if( ITA_MATLAB_DEPLOY_MATLAB_EXECUTABLE )
if( ITA_VAMATLAB_DEPLOY_MATLAB_EXECUTABLE )
install( FILES "${CMAKE_BINARY_DIR}/lib/VAMatlab.${MATLAB_MEX_EXTENSION}" DESTINATION "bin" )
endif( )
......@@ -103,7 +116,7 @@ install( FILES "matlab/itaVA_example_simple.m" DESTINATION "matlab" )
install( FILES "matlab/itaVA_example_tracked_listener.m" DESTINATION "matlab" )
# Build Matlab class using Matlab (future work)
if( ITA_VA_MATLAB_POSTBUILD_CREATE_MATLAB_CLASS )
if( ITA_VAMATLAB_POSTBUILD_CREATE_MATLAB_CLASS )
set( MATLAB_BUILD_CLASS_COMMAND "matlab -nodisplay -nosplash -nodesktop -r \"run( 'matlab/itaVA_build_absolute.m' )\"" )
add_custom_command( TARGET VAMatlab POST_BUILD COMMAND ${MATLAB_BUILD_CLASS_COMMAND} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Running matlab itaVA installer" VERBATIM )
else( )
......
Markdown is supported
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