Commit 92aafb14 authored by Jussi Lindgren's avatar Jussi Lindgren

Build: Fix for stim generation on Visual Studio

parent 0ac8d1df
......@@ -8,12 +8,6 @@ SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl)
ADD_EXECUTABLE(openvibe-stimulation-generator ${source_files})
if(UNIX)
SET(stim_generator_path "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "stim_generator_path")
else()
get_property(path_to_target TARGET openvibe-stimulation-generator PROPERTY LOCATION)
SET(stim_generator_path "${path_to_target}" CACHE INTERNAL "stim_generator_path")
endif()
# ---------------------------------
# Target macros
# Defines target operating system
......
......@@ -7,7 +7,7 @@ SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/share/OV_stimulations.m
DEPENDS openvibe-stimulation-generator ${openvibe-toolkit_SOURCE_DIR}/share/stimulation_list.txt
COMMAND ${stim_generator_path}/openvibe-stimulation-generator
COMMAND openvibe-stimulation-generator
--matlab
${openvibe-toolkit_SOURCE_DIR}/share/stimulation_list.txt
${CMAKE_CURRENT_SOURCE_DIR}/share/OV_stimulations.m
......
......@@ -10,7 +10,7 @@ SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_
#We need to generate the stimulation files
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/include/toolkit/ovtk_stimulations.h ${CMAKE_CURRENT_SOURCE_DIR}/src/ovtk_stimulations.cpp
DEPENDS openvibe-stimulation-generator ${CMAKE_CURRENT_SOURCE_DIR}/share/stimulation_list.txt
COMMAND ${stim_generator_path}/openvibe-stimulation-generator
COMMAND openvibe-stimulation-generator
--cpp
${CMAKE_CURRENT_SOURCE_DIR}/share/stimulation_list.txt
${CMAKE_CURRENT_SOURCE_DIR}/include/toolkit/ovtk_stimulations.h
......
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