mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
the task allcsim will build everything requires ntcore desktop to be built also fixed Driverstation to match non-sim C++ API Conflicts: wpilibc/simulation/CMakeLists.txt Change-Id: Id38141a5b48ed7fe064c7e6c8d2f618481b7e298
39 lines
886 B
CMake
39 lines
886 B
CMake
cmake_minimum_required(VERSION 2.8.3)
|
|
project(frc_gazebo_plugins)
|
|
|
|
set (PLUGINS
|
|
clock
|
|
dc_motor
|
|
encoder
|
|
gyro
|
|
limit_switch
|
|
pneumatic_piston
|
|
potentiometer
|
|
rangefinder
|
|
servo)
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/plugins)
|
|
|
|
link_directories(${GAZEBO_LIBRARY_DIRS})
|
|
|
|
foreach(PLUGIN ${PLUGINS})
|
|
|
|
file(GLOB_RECURSE SRC_FILES ${PLUGIN}/src/*.cpp)
|
|
|
|
include_directories(src ${Boost_INCLUDE_DIR} ${GZ_MSGS_INCLUDE_DIR} ${PROTOBUF_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS})
|
|
|
|
if (WIN32)
|
|
add_library(${PLUGIN} ${SRC_FILES})
|
|
else()
|
|
add_library(${PLUGIN} SHARED ${SRC_FILES})
|
|
endif()
|
|
|
|
target_link_libraries(${PLUGIN} gz_msgs ${GAZEBO_LIBRARIES} ${Boost_LIBRARIES})
|
|
|
|
install(TARGETS ${PLUGIN} DESTINATION $ENV{HOME}/wpilib/simulation/plugins)
|
|
|
|
endforeach()
|
|
|
|
# create a dummy target the depends on all the plugins
|
|
add_custom_target(${PROJECT_NAME} DEPENDS ${PLUGINS})
|