Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake support for MotoPlus builder #381

Open
wants to merge 3 commits into
base: kinetic-devel
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions motoman_driver/MotoPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.0)

project(MpRosAllControllers NONE)

set(PROJECT_VERSION v192)

FILE(GLOB_RECURSE SOURCES "*.c")
FILE(GLOB_RECURSE HEADERS "*.h")
FILE(GLOB_RECURSE LIBS "*.*ib")
FILE(GLOB_RECURSE MPS "*.mps")

set(MPBUILDER_DIR "C:/Program Files (x86)/Yaskawa/MotoPlus for Visual Studio")
set(MPBUILDER_PATH ${MPBUILDER_DIR}/mpbuilder.exe)

macro(PROJECT_CONFIG name controller suffix)
set(path ${CMAKE_SOURCE_DIR}/output/${controller}/${name}${suffix})
string(REPLACE / \\ path ${path})
add_custom_target(${name}${suffix} ALL
SOURCES
${SOURCES}
${HEADERS}
${controller}CompilerArguments.mps
${controller}LinkerArguments.mps
COMMAND ${MPBUILDER_PATH}
-c ${controller}
-p ${CMAKE_SOURCE_DIR}
-n ${name}${suffix}
-l N
-d T
-o build
COMMAND rename
${path}\\${name}${suffix}.out
${name}${suffix}${PROJECT_VERSION}.out)
endmacro(PROJECT_CONFIG)

project_config(MotoRos DX100 DX1_)
project_config(MotoRos DX200 DX2_)
project_config(MotoRos FS100 FS_)
project_config(MotoRos YRC1000 YRC1u_)
project_config(MotoRos YRC1000u YRC1_)