diff --git a/CMakeLists.txt b/CMakeLists.txt index e9c67296b..e429cc1d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,217 +2,14 @@ # This software may be modified and distributed under the terms of the # GNU Lesser General Public License v2.1 or any later version. +# This file is here only to allow build systems to find the +# real CMake project that is stored in the scenario/ folder. cmake_minimum_required(VERSION 3.16) -project(Scenario VERSION 1.2.2) - -# Add custom functions / macros -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) - -# C++ standard -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -# Include useful features -include(GNUInstallDirs) - -# Build type -if(NOT CMAKE_CONFIGURATION_TYPES) - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING - "Choose the type of build, recommended options are: Debug or Release" FORCE) - endif() - set(SCENARIO_BUILD_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo") - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${SCENARIO_BUILD_TYPES}) -endif() - -# This new build mode configures the CMake project to be compatible with the pipeline to -# create the PyPI linux wheel -include(AddNewBuildMode) -add_new_build_mode(NAME "PyPI" TEMPLATE "Release") - -# Expose shared or static compilation -set(SCENARIO_BUILD_SHARED_LIBRARY TRUE - CACHE BOOL "Compile libraries as shared libraries") - -if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "PyPI") - # Apply the user choice - set(BUILD_SHARED_LIBS ${SCENARIO_BUILD_SHARED_LIBRARY}) -else() - # Check that is Linux - if(NOT (UNIX AND NOT APPLE)) - message(FATAL_ERROR "PyPI packages can be only created for Linux at the moment") - endif() - - if(SCENARIO_BUILD_SHARED_LIBRARY) - message(WARNING "Enabling static compilation, required by the PyPI build mode") - endif() - - # Force static compilation - set(BUILD_SHARED_LIBS FALSE) -endif() - -# Use -fPIC even if statically compiled -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -# Tweak linker flags in Linux -if(UNIX AND NOT APPLE) - if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") - get_filename_component(LINKER_BIN ${CMAKE_LINKER} NAME) - if("${LINKER_BIN}" STREQUAL "ld") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--unresolved-symbols=report-all") - endif() - endif() -endif() - -# Control where binaries and libraries are placed in the build folder. -# This simplifies tests running in Windows. -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") - -# Get include-what-you-use information when compiling -option(SCENARIO_USE_IWYU "Get the output of include-what-you-use" OFF) -mark_as_advanced(SCENARIO_USE_IWYU) -if(SCENARIO_USE_IWYU) - find_program(IWYU_PATH NAMES include-what-you-use iwyu) - if(IWYU_PATH) - set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_PATH}) - endif() -endif() - -# Settings for RPATH -if(NOT MSVC) - option(ENABLE_RPATH "Enable RPATH installation" TRUE) - mark_as_advanced(ENABLE_RPATH) -endif() - -# Dependencies -add_subdirectory(deps) - -if(${CMAKE_VERSION} VERSION_GREATER 3.15) - cmake_policy(SET CMP0094 NEW) -endif() - -# Find virtualenv's before system's interpreters -set(Python3_FIND_VIRTUALENV "FIRST" CACHE STRING - "Configure the detection of virtual environments") -set(Python3_FIND_VIRTUALENV_TYPES "FIRST" "ONLY" "STANDARD") -mark_as_advanced(Python3_FIND_VIRTUALENV) -set_property(CACHE Python3_FIND_VIRTUALENV PROPERTY STRINGS ${Python3_FIND_VIRTUALENV_TYPES}) - -# Find Python3 -find_package(Python3 COMPONENTS Interpreter Development REQUIRED) -message(STATUS "Using Python: ${Python3_EXECUTABLE}") - -# Select the appropriate install prefix used throughout the project. -set(SCENARIO_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR}) -set(SCENARIO_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) -set(SCENARIO_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) - -if(NOT CMAKE_BUILD_TYPE STREQUAL "PyPI") - # Add the libraries installed in the Python site-package folder - set(EXTRA_RPATH_DIRS - "${Python3_SITELIB}" - "${Python3_SITELIB}/scenario/bindings") -else() - # Add the libraries installed in the Python site-package folder - # (that in this case is CMAKE_INSTALL_PREFIX) - set(EXTRA_RPATH_DIRS - "${CMAKE_INSTALL_PREFIX}" - "${CMAKE_INSTALL_PREFIX}/scenario/bindings") -endif() - -# Configure RPATH -include(AddInstallRPATHSupport) -add_install_rpath_support( - BIN_DIRS - "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_BINDIR}" - LIB_DIRS - "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_LIBDIR}" - "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_LIBDIR}/scenario/plugins" - "${EXTRA_RPATH_DIRS}" - INSTALL_NAME_DIR - "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_LIBDIR}" - DEPENDS ENABLE_RPATH - USE_LINK_PATH) - -# Find a supported Ignition distribution -if(NOT IGNITION_DISTRIBUTION) - - include(FindIgnitionDistribution) - set(SUPPORTED_IGNITION_DISTRIBUTIONS "Edifice" "Dome" "Citadel") - - foreach(distribution IN LISTS SUPPORTED_IGNITION_DISTRIBUTIONS) - - find_ignition_distribution( - CODENAME ${distribution} - PACKAGES - ignition-gazebo - REQUIRED FALSE) - - if(${${distribution}_FOUND}) - message(STATUS "Found Ignition ${distribution}") - - # Select Ignition distribution - set(IGNITION_DISTRIBUTION "${distribution}" CACHE - STRING "The Ignition distribution found in the system") - set_property(CACHE IGNITION_DISTRIBUTION PROPERTY - STRINGS ${SUPPORTED_IGNITION_DISTRIBUTIONS}) - - break() - endif() - - endforeach() - -endif() - -if(NOT IGNITION_DISTRIBUTION OR "${IGNITION_DISTRIBUTION}" STREQUAL "") - set(USE_IGNITION FALSE) -else() - set(USE_IGNITION TRUE) -endif() - -option(SCENARIO_USE_IGNITION - "Build C++ code depending on Ignition" - ${USE_IGNITION}) - -# Fail if Ignition is enabled but no compatible distribution was found -if(SCENARIO_USE_IGNITION AND "${IGNITION_DISTRIBUTION}" STREQUAL "") - message(FATAL_ERROR "Failed to find a compatible Ignition Gazebo distribution") -endif() - -# Alias the targets -if(SCENARIO_USE_IGNITION) - include(ImportTargets${IGNITION_DISTRIBUTION}) -endif() - -# Helper for exporting targets -include(InstallBasicPackageFiles) - -# ========= -# SCENARI/O -# ========= - +project(scenario) add_subdirectory(scenario) -# ======== -# BINDINGS -# ======== - -# Require to find Ignition libraries when packaging for PyPI -if(CMAKE_BUILD_TYPE STREQUAL "PyPI" AND NOT USE_IGNITION) - message(FATAL_ERROR "Found no Ignition distribution for PyPI package") -endif() - -find_package(SWIG 4.0 QUIET) -option(SCENARIO_ENABLE_BINDINGS "Enable SWIG bindings" ${SWIG_FOUND}) - -if(SCENARIO_ENABLE_BINDINGS) - add_subdirectory(bindings) -endif() - -# Add unistall target +# The uninstall target resource must be included in the top-level CMakeLists +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scenario/cmake) include(AddUninstallTarget) # ============= diff --git a/docs/sphinx/CMakeLists.txt b/docs/sphinx/CMakeLists.txt index b52bba104..5bdcf3a54 100644 --- a/docs/sphinx/CMakeLists.txt +++ b/docs/sphinx/CMakeLists.txt @@ -8,7 +8,7 @@ # 2. The folder containing the bindings Python modules # set(PYTHON_PACKAGES_DIR "${CMAKE_SOURCE_DIR}/python") -set(BINDINGS_MODULES_DIR "${PROJECT_BINARY_DIR}/bindings") +set(BINDINGS_MODULES_DIR "${PROJECT_BINARY_DIR}/scenario/bindings") # ============= # APIDOC TARGET diff --git a/scenario/CMakeLists.txt b/scenario/CMakeLists.txt index 7721c9f77..e6658d0f9 100644 --- a/scenario/CMakeLists.txt +++ b/scenario/CMakeLists.txt @@ -1,39 +1,216 @@ -# Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved. +# Copyright (C) 2019 Istituto Italiano di Tecnologia (IIT). All rights reserved. # This software may be modified and distributed under the terms of the # GNU Lesser General Public License v2.1 or any later version. -add_subdirectory(core) +cmake_minimum_required(VERSION 3.16) +project(scenario VERSION 1.2.2) -set(SCENARIO_COMPONENTS ScenarioCore) -set(SCENARIO_PRIVATE_DEPENDENCIES "") +# Add custom functions / macros +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +# C++ standard +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# Include useful features +include(GNUInstallDirs) + +# Build type +if(NOT CMAKE_CONFIGURATION_TYPES) + if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING + "Choose the type of build, recommended options are: Debug or Release" FORCE) + endif() + set(SCENARIO_BUILD_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${SCENARIO_BUILD_TYPES}) +endif() + +# This new build mode configures the CMake project to be compatible with the pipeline to +# create the PyPI linux wheel +include(AddNewBuildMode) +add_new_build_mode(NAME "PyPI" TEMPLATE "Release") + +# Expose shared or static compilation +set(SCENARIO_BUILD_SHARED_LIBRARY TRUE + CACHE BOOL "Compile libraries as shared libraries") + +if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "PyPI") + # Apply the user choice + set(BUILD_SHARED_LIBS ${SCENARIO_BUILD_SHARED_LIBRARY}) +else() + # Check that is Linux + if(NOT (UNIX AND NOT APPLE)) + message(FATAL_ERROR "PyPI packages can be only created for Linux at the moment") + endif() + + if(SCENARIO_BUILD_SHARED_LIBRARY) + message(WARNING "Enabling static compilation, required by the PyPI build mode") + endif() + + # Force static compilation + set(BUILD_SHARED_LIBS FALSE) +endif() + +# Use -fPIC even if statically compiled +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +# Tweak linker flags in Linux +if(UNIX AND NOT APPLE) + if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + get_filename_component(LINKER_BIN ${CMAKE_LINKER} NAME) + if("${LINKER_BIN}" STREQUAL "ld") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--unresolved-symbols=report-all") + endif() + endif() +endif() + +# Control where binaries and libraries are placed in the build folder. +# This simplifies tests running in Windows. +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") + +# Get include-what-you-use information when compiling +option(SCENARIO_USE_IWYU "Get the output of include-what-you-use" OFF) +mark_as_advanced(SCENARIO_USE_IWYU) +if(SCENARIO_USE_IWYU) + find_program(IWYU_PATH NAMES include-what-you-use iwyu) + if(IWYU_PATH) + set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_PATH}) + endif() +endif() + +# Settings for RPATH +if(NOT MSVC) + option(ENABLE_RPATH "Enable RPATH installation" TRUE) + mark_as_advanced(ENABLE_RPATH) +endif() + +# Dependencies +add_subdirectory(deps) + +if(${CMAKE_VERSION} VERSION_GREATER 3.15) + cmake_policy(SET CMP0094 NEW) +endif() + +# Find virtualenv's before system's interpreters +set(Python3_FIND_VIRTUALENV "FIRST" CACHE STRING + "Configure the detection of virtual environments") +set(Python3_FIND_VIRTUALENV_TYPES "FIRST" "ONLY" "STANDARD") +mark_as_advanced(Python3_FIND_VIRTUALENV) +set_property(CACHE Python3_FIND_VIRTUALENV PROPERTY STRINGS ${Python3_FIND_VIRTUALENV_TYPES}) + +# Find Python3 +find_package(Python3 COMPONENTS Interpreter Development REQUIRED) +message(STATUS "Using Python: ${Python3_EXECUTABLE}") + +# Select the appropriate install prefix used throughout the project. +set(SCENARIO_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR}) +set(SCENARIO_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) +set(SCENARIO_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) + +if(NOT CMAKE_BUILD_TYPE STREQUAL "PyPI") + # Add the libraries installed in the Python site-package folder + set(EXTRA_RPATH_DIRS + "${Python3_SITELIB}" + "${Python3_SITELIB}/scenario/bindings") +else() + # Add the libraries installed in the Python site-package folder + # (that in this case is CMAKE_INSTALL_PREFIX) + set(EXTRA_RPATH_DIRS + "${CMAKE_INSTALL_PREFIX}" + "${CMAKE_INSTALL_PREFIX}/scenario/bindings") +endif() + +# Configure RPATH +include(AddInstallRPATHSupport) +add_install_rpath_support( + BIN_DIRS + "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_BINDIR}" + LIB_DIRS + "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_LIBDIR}" + "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_LIBDIR}/scenario/plugins" + "${EXTRA_RPATH_DIRS}" + INSTALL_NAME_DIR + "${CMAKE_INSTALL_PREFIX}/${SCENARIO_INSTALL_LIBDIR}" + DEPENDS ENABLE_RPATH + USE_LINK_PATH) + +# Find a supported Ignition distribution +if(NOT IGNITION_DISTRIBUTION) + + include(FindIgnitionDistribution) + set(SUPPORTED_IGNITION_DISTRIBUTIONS "Edifice" "Dome" "Citadel") + + foreach(distribution IN LISTS SUPPORTED_IGNITION_DISTRIBUTIONS) + + find_ignition_distribution( + CODENAME ${distribution} + PACKAGES + ignition-gazebo + REQUIRED FALSE) + + if(${${distribution}_FOUND}) + message(STATUS "Found Ignition ${distribution}") + + # Select Ignition distribution + set(IGNITION_DISTRIBUTION "${distribution}" CACHE + STRING "The Ignition distribution found in the system") + set_property(CACHE IGNITION_DISTRIBUTION PROPERTY + STRINGS ${SUPPORTED_IGNITION_DISTRIBUTIONS}) + + break() + endif() + + endforeach() + +endif() + +if(NOT IGNITION_DISTRIBUTION OR "${IGNITION_DISTRIBUTION}" STREQUAL "") + set(USE_IGNITION FALSE) +else() + set(USE_IGNITION TRUE) +endif() + +option(SCENARIO_USE_IGNITION + "Build C++ code depending on Ignition" + ${USE_IGNITION}) + +# Fail if Ignition is enabled but no compatible distribution was found +if(SCENARIO_USE_IGNITION AND "${IGNITION_DISTRIBUTION}" STREQUAL "") + message(FATAL_ERROR "Failed to find a compatible Ignition Gazebo distribution") +endif() + +# Alias the targets if(SCENARIO_USE_IGNITION) + include(ImportTargets${IGNITION_DISTRIBUTION}) +endif() - option(ENABLE_PROFILER "Enable Ignition Profiler" OFF) - mark_as_advanced(ENABLE_PROFILER) +# Helper for exporting targets +include(InstallBasicPackageFiles) - add_subdirectory(gazebo) - add_subdirectory(plugins) - add_subdirectory(controllers) +# ========= +# SCENARI/O +# ========= - list(APPEND SCENARIO_COMPONENTS ScenarioGazebo ScenarioControllers) +add_subdirectory(src) +# ======== +# BINDINGS +# ======== + +# Require to find Ignition libraries when packaging for PyPI +if(CMAKE_BUILD_TYPE STREQUAL "PyPI" AND NOT USE_IGNITION) + message(FATAL_ERROR "Found no Ignition distribution for PyPI package") endif() -# Dummy meta target for the top-level EXPORT -add_library(Scenario INTERFACE) +find_package(SWIG 4.0 QUIET) +option(SCENARIO_ENABLE_BINDINGS "Enable SWIG bindings" ${SWIG_FOUND}) -install( - TARGETS Scenario - EXPORT ScenarioExport) +if(SCENARIO_ENABLE_BINDINGS) + add_subdirectory(bindings) +endif() -install_basic_package_files(Scenario - VERSION ${PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion - EXPORT ScenarioExport - DEPENDENCIES ${SCENARIO_COMPONENTS} - PRIVATE_DEPENDENCIES ${SCENARIO_PRIVATE_DEPENDENCIES} - NAMESPACE Scenario:: - NO_CHECK_REQUIRED_COMPONENTS_MACRO - INSTALL_DESTINATION - ${SCENARIO_INSTALL_LIBDIR}/cmake/Scenario) +# Add unistall target +include(AddUninstallTarget) diff --git a/bindings/CMakeLists.txt b/scenario/bindings/CMakeLists.txt similarity index 100% rename from bindings/CMakeLists.txt rename to scenario/bindings/CMakeLists.txt diff --git a/bindings/__init__.py b/scenario/bindings/__init__.py similarity index 100% rename from bindings/__init__.py rename to scenario/bindings/__init__.py diff --git a/bindings/core/CMakeLists.txt b/scenario/bindings/core/CMakeLists.txt similarity index 100% rename from bindings/core/CMakeLists.txt rename to scenario/bindings/core/CMakeLists.txt diff --git a/bindings/core/core.i b/scenario/bindings/core/core.i similarity index 100% rename from bindings/core/core.i rename to scenario/bindings/core/core.i diff --git a/bindings/gazebo/CMakeLists.txt b/scenario/bindings/gazebo/CMakeLists.txt similarity index 100% rename from bindings/gazebo/CMakeLists.txt rename to scenario/bindings/gazebo/CMakeLists.txt diff --git a/bindings/gazebo/gazebo.i b/scenario/bindings/gazebo/gazebo.i similarity index 100% rename from bindings/gazebo/gazebo.i rename to scenario/bindings/gazebo/gazebo.i diff --git a/bindings/gazebo/to_gazebo.i b/scenario/bindings/gazebo/to_gazebo.i similarity index 100% rename from bindings/gazebo/to_gazebo.i rename to scenario/bindings/gazebo/to_gazebo.i diff --git a/cmake/AddNewBuildMode.cmake b/scenario/cmake/AddNewBuildMode.cmake similarity index 100% rename from cmake/AddNewBuildMode.cmake rename to scenario/cmake/AddNewBuildMode.cmake diff --git a/scenario/cmake/AddUninstallTarget.cmake b/scenario/cmake/AddUninstallTarget.cmake new file mode 100644 index 000000000..4012104f2 --- /dev/null +++ b/scenario/cmake/AddUninstallTarget.cmake @@ -0,0 +1,102 @@ +#.rst: +# AddUninstallTarget +# ------------------ +# +# Add the "uninstall" target for your project:: +# +# include(AddUninstallTarget) +# +# +# will create a file ``cmake_uninstall.cmake`` in the build directory and add a +# custom target ``uninstall`` (or ``UNINSTALL`` on Visual Studio and Xcode) that +# will remove the files installed by your package (using +# ``install_manifest.txt``). +# See also +# https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake +# +# The :module:`AddUninstallTarget` module must be included in your main +# ``CMakeLists.txt``. If included in a subdirectory it does nothing. +# This allows you to use it safely in your main ``CMakeLists.txt`` and include +# your project using ``add_subdirectory`` (for example when using it with +# :cmake:module:`FetchContent`). +# +# If the ``uninstall`` target already exists, the module does nothing. + +#============================================================================= +# Copyright 2008-2013 Kitware, Inc. +# Copyright 2013 Istituto Italiano di Tecnologia (IIT) +# Authors: Daniele E. Domenichelli +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + + +# AddUninstallTarget works only when included in the main CMakeLists.txt +if(NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") + return() +endif() + +# The name of the target is uppercase in MSVC and Xcode (for coherence with the +# other standard targets) +if("${CMAKE_GENERATOR}" MATCHES "^(Visual Studio|Xcode)") + set(_uninstall "UNINSTALL") +else() + set(_uninstall "uninstall") +endif() + +# If target is already defined don't do anything +if(TARGET ${_uninstall}) + return() +endif() + + +set(_filename cmake_uninstall.cmake) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_filename}" +"if(NOT EXISTS \"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\") + message(WARNING \"Cannot find install manifest: \\\"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\\\"\") + return() +endif() +file(READ \"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\" files) +string(STRIP \"\${files}\" files) +string(REGEX REPLACE \"\\n\" \";\" files \"\${files}\") +list(REVERSE files) +foreach(file \${files}) + if(IS_SYMLINK \"\$ENV{DESTDIR}\${file}\" OR EXISTS \"\$ENV{DESTDIR}\${file}\") + message(STATUS \"Uninstalling: \$ENV{DESTDIR}\${file}\") + execute_process( + COMMAND \${CMAKE_COMMAND} -E remove \"\$ENV{DESTDIR}\${file}\" + OUTPUT_VARIABLE rm_out + RESULT_VARIABLE rm_retval) + if(NOT \"\${rm_retval}\" EQUAL 0) + message(FATAL_ERROR \"Problem when removing \\\"\$ENV{DESTDIR}\${file}\\\"\") + endif() + else() + message(STATUS \"Not-found: \$ENV{DESTDIR}\${file}\") + endif() +endforeach(file) +") + +set(_desc "Uninstall the project...") +if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") + set(_comment COMMAND \$\(CMAKE_COMMAND\) -E cmake_echo_color --switch=$\(COLOR\) --cyan "${_desc}") +else() + set(_comment COMMENT "${_desc}") +endif() +add_custom_target(${_uninstall} + ${_comment} + COMMAND ${CMAKE_COMMAND} -P ${_filename} + USES_TERMINAL + BYPRODUCTS uninstall_byproduct + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") +set_property(SOURCE uninstall_byproduct PROPERTY SYMBOLIC 1) + +set_property(TARGET ${_uninstall} PROPERTY FOLDER "CMakePredefinedTargets") + diff --git a/cmake/AliasImportedTarget.cmake b/scenario/cmake/AliasImportedTarget.cmake similarity index 100% rename from cmake/AliasImportedTarget.cmake rename to scenario/cmake/AliasImportedTarget.cmake diff --git a/cmake/FindIgnitionDistribution.cmake b/scenario/cmake/FindIgnitionDistribution.cmake similarity index 100% rename from cmake/FindIgnitionDistribution.cmake rename to scenario/cmake/FindIgnitionDistribution.cmake diff --git a/cmake/FindPython/Support.cmake b/scenario/cmake/FindPython/Support.cmake similarity index 100% rename from cmake/FindPython/Support.cmake rename to scenario/cmake/FindPython/Support.cmake diff --git a/cmake/FindPython3.cmake b/scenario/cmake/FindPython3.cmake similarity index 100% rename from cmake/FindPython3.cmake rename to scenario/cmake/FindPython3.cmake diff --git a/cmake/FindSphinx.cmake b/scenario/cmake/FindSphinx.cmake similarity index 100% rename from cmake/FindSphinx.cmake rename to scenario/cmake/FindSphinx.cmake diff --git a/cmake/FindSphinxApidoc.cmake b/scenario/cmake/FindSphinxApidoc.cmake similarity index 100% rename from cmake/FindSphinxApidoc.cmake rename to scenario/cmake/FindSphinxApidoc.cmake diff --git a/cmake/FindSphinxMultiVersion.cmake b/scenario/cmake/FindSphinxMultiVersion.cmake similarity index 100% rename from cmake/FindSphinxMultiVersion.cmake rename to scenario/cmake/FindSphinxMultiVersion.cmake diff --git a/cmake/ImportTargetsCitadel.cmake b/scenario/cmake/ImportTargetsCitadel.cmake similarity index 100% rename from cmake/ImportTargetsCitadel.cmake rename to scenario/cmake/ImportTargetsCitadel.cmake diff --git a/cmake/ImportTargetsDome.cmake b/scenario/cmake/ImportTargetsDome.cmake similarity index 100% rename from cmake/ImportTargetsDome.cmake rename to scenario/cmake/ImportTargetsDome.cmake diff --git a/cmake/ImportTargetsEdifice.cmake b/scenario/cmake/ImportTargetsEdifice.cmake similarity index 100% rename from cmake/ImportTargetsEdifice.cmake rename to scenario/cmake/ImportTargetsEdifice.cmake diff --git a/deps/CMakeLists.txt b/scenario/deps/CMakeLists.txt similarity index 100% rename from deps/CMakeLists.txt rename to scenario/deps/CMakeLists.txt diff --git a/deps/clara/clara.hpp b/scenario/deps/clara/clara.hpp similarity index 100% rename from deps/clara/clara.hpp rename to scenario/deps/clara/clara.hpp diff --git a/scenario/setup.py b/scenario/setup.py index 9964dd859..ce8b54661 100644 --- a/scenario/setup.py +++ b/scenario/setup.py @@ -51,7 +51,6 @@ ], python_requires=">=3.0", ext_modules=[CMakeExtension(name="ScenarioCMakeProject", - source_dir=str(this_directory.parent), install_prefix="scenario", cmake_build_type="PyPI", cmake_depends_on=["idyntree"], diff --git a/scenario/src/CMakeLists.txt b/scenario/src/CMakeLists.txt new file mode 100644 index 000000000..7721c9f77 --- /dev/null +++ b/scenario/src/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved. +# This software may be modified and distributed under the terms of the +# GNU Lesser General Public License v2.1 or any later version. + +add_subdirectory(core) + +set(SCENARIO_COMPONENTS ScenarioCore) +set(SCENARIO_PRIVATE_DEPENDENCIES "") + +if(SCENARIO_USE_IGNITION) + + option(ENABLE_PROFILER "Enable Ignition Profiler" OFF) + mark_as_advanced(ENABLE_PROFILER) + + add_subdirectory(gazebo) + add_subdirectory(plugins) + add_subdirectory(controllers) + + list(APPEND SCENARIO_COMPONENTS ScenarioGazebo ScenarioControllers) + +endif() + +# Dummy meta target for the top-level EXPORT +add_library(Scenario INTERFACE) + +install( + TARGETS Scenario + EXPORT ScenarioExport) + +install_basic_package_files(Scenario + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion + EXPORT ScenarioExport + DEPENDENCIES ${SCENARIO_COMPONENTS} + PRIVATE_DEPENDENCIES ${SCENARIO_PRIVATE_DEPENDENCIES} + NAMESPACE Scenario:: + NO_CHECK_REQUIRED_COMPONENTS_MACRO + INSTALL_DESTINATION + ${SCENARIO_INSTALL_LIBDIR}/cmake/Scenario) diff --git a/scenario/controllers/CMakeLists.txt b/scenario/src/controllers/CMakeLists.txt similarity index 100% rename from scenario/controllers/CMakeLists.txt rename to scenario/src/controllers/CMakeLists.txt diff --git a/scenario/controllers/include/scenario/controllers/ComputedTorqueFixedBase.h b/scenario/src/controllers/include/scenario/controllers/ComputedTorqueFixedBase.h similarity index 100% rename from scenario/controllers/include/scenario/controllers/ComputedTorqueFixedBase.h rename to scenario/src/controllers/include/scenario/controllers/ComputedTorqueFixedBase.h diff --git a/scenario/controllers/include/scenario/controllers/Controller.h b/scenario/src/controllers/include/scenario/controllers/Controller.h similarity index 100% rename from scenario/controllers/include/scenario/controllers/Controller.h rename to scenario/src/controllers/include/scenario/controllers/Controller.h diff --git a/scenario/controllers/include/scenario/controllers/References.h b/scenario/src/controllers/include/scenario/controllers/References.h similarity index 100% rename from scenario/controllers/include/scenario/controllers/References.h rename to scenario/src/controllers/include/scenario/controllers/References.h diff --git a/scenario/controllers/src/ComputedTorqueFixedBase.cpp b/scenario/src/controllers/src/ComputedTorqueFixedBase.cpp similarity index 100% rename from scenario/controllers/src/ComputedTorqueFixedBase.cpp rename to scenario/src/controllers/src/ComputedTorqueFixedBase.cpp diff --git a/scenario/core/CMakeLists.txt b/scenario/src/core/CMakeLists.txt similarity index 100% rename from scenario/core/CMakeLists.txt rename to scenario/src/core/CMakeLists.txt diff --git a/scenario/core/include/scenario/core/Joint.h b/scenario/src/core/include/scenario/core/Joint.h similarity index 100% rename from scenario/core/include/scenario/core/Joint.h rename to scenario/src/core/include/scenario/core/Joint.h diff --git a/scenario/core/include/scenario/core/Link.h b/scenario/src/core/include/scenario/core/Link.h similarity index 100% rename from scenario/core/include/scenario/core/Link.h rename to scenario/src/core/include/scenario/core/Link.h diff --git a/scenario/core/include/scenario/core/Model.h b/scenario/src/core/include/scenario/core/Model.h similarity index 100% rename from scenario/core/include/scenario/core/Model.h rename to scenario/src/core/include/scenario/core/Model.h diff --git a/scenario/core/include/scenario/core/World.h b/scenario/src/core/include/scenario/core/World.h similarity index 100% rename from scenario/core/include/scenario/core/World.h rename to scenario/src/core/include/scenario/core/World.h diff --git a/scenario/core/include/scenario/core/utils/Log.h b/scenario/src/core/include/scenario/core/utils/Log.h similarity index 100% rename from scenario/core/include/scenario/core/utils/Log.h rename to scenario/src/core/include/scenario/core/utils/Log.h diff --git a/scenario/core/include/scenario/core/utils/signals.h b/scenario/src/core/include/scenario/core/utils/signals.h similarity index 100% rename from scenario/core/include/scenario/core/utils/signals.h rename to scenario/src/core/include/scenario/core/utils/signals.h diff --git a/scenario/core/include/scenario/core/utils/utils.h b/scenario/src/core/include/scenario/core/utils/utils.h similarity index 100% rename from scenario/core/include/scenario/core/utils/utils.h rename to scenario/src/core/include/scenario/core/utils/utils.h diff --git a/scenario/core/src/signals.cpp b/scenario/src/core/src/signals.cpp similarity index 100% rename from scenario/core/src/signals.cpp rename to scenario/src/core/src/signals.cpp diff --git a/scenario/core/src/utils.cpp b/scenario/src/core/src/utils.cpp similarity index 100% rename from scenario/core/src/utils.cpp rename to scenario/src/core/src/utils.cpp diff --git a/scenario/gazebo/CMakeLists.txt b/scenario/src/gazebo/CMakeLists.txt similarity index 100% rename from scenario/gazebo/CMakeLists.txt rename to scenario/src/gazebo/CMakeLists.txt diff --git a/scenario/gazebo/include/scenario/gazebo/GazeboEntity.h b/scenario/src/gazebo/include/scenario/gazebo/GazeboEntity.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/GazeboEntity.h rename to scenario/src/gazebo/include/scenario/gazebo/GazeboEntity.h diff --git a/scenario/gazebo/include/scenario/gazebo/GazeboSimulator.h b/scenario/src/gazebo/include/scenario/gazebo/GazeboSimulator.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/GazeboSimulator.h rename to scenario/src/gazebo/include/scenario/gazebo/GazeboSimulator.h diff --git a/scenario/gazebo/include/scenario/gazebo/Joint.h b/scenario/src/gazebo/include/scenario/gazebo/Joint.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/Joint.h rename to scenario/src/gazebo/include/scenario/gazebo/Joint.h diff --git a/scenario/gazebo/include/scenario/gazebo/Link.h b/scenario/src/gazebo/include/scenario/gazebo/Link.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/Link.h rename to scenario/src/gazebo/include/scenario/gazebo/Link.h diff --git a/scenario/gazebo/include/scenario/gazebo/Log.h b/scenario/src/gazebo/include/scenario/gazebo/Log.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/Log.h rename to scenario/src/gazebo/include/scenario/gazebo/Log.h diff --git a/scenario/gazebo/include/scenario/gazebo/Model.h b/scenario/src/gazebo/include/scenario/gazebo/Model.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/Model.h rename to scenario/src/gazebo/include/scenario/gazebo/Model.h diff --git a/scenario/gazebo/include/scenario/gazebo/World.h b/scenario/src/gazebo/include/scenario/gazebo/World.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/World.h rename to scenario/src/gazebo/include/scenario/gazebo/World.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/BasePoseTarget.h b/scenario/src/gazebo/include/scenario/gazebo/components/BasePoseTarget.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/BasePoseTarget.h rename to scenario/src/gazebo/include/scenario/gazebo/components/BasePoseTarget.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/BaseWorldAccelerationTarget.h b/scenario/src/gazebo/include/scenario/gazebo/components/BaseWorldAccelerationTarget.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/BaseWorldAccelerationTarget.h rename to scenario/src/gazebo/include/scenario/gazebo/components/BaseWorldAccelerationTarget.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/BaseWorldVelocityTarget.h b/scenario/src/gazebo/include/scenario/gazebo/components/BaseWorldVelocityTarget.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/BaseWorldVelocityTarget.h rename to scenario/src/gazebo/include/scenario/gazebo/components/BaseWorldVelocityTarget.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/ExternalWorldWrenchCmdWithDuration.h b/scenario/src/gazebo/include/scenario/gazebo/components/ExternalWorldWrenchCmdWithDuration.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/ExternalWorldWrenchCmdWithDuration.h rename to scenario/src/gazebo/include/scenario/gazebo/components/ExternalWorldWrenchCmdWithDuration.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/HistoryOfAppliedJointForces.h b/scenario/src/gazebo/include/scenario/gazebo/components/HistoryOfAppliedJointForces.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/HistoryOfAppliedJointForces.h rename to scenario/src/gazebo/include/scenario/gazebo/components/HistoryOfAppliedJointForces.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointAcceleration.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointAcceleration.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointAcceleration.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointAcceleration.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointAccelerationTarget.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointAccelerationTarget.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointAccelerationTarget.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointAccelerationTarget.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointControlMode.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointControlMode.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointControlMode.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointControlMode.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointController.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointController.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointController.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointController.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointControllerPeriod.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointControllerPeriod.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointControllerPeriod.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointControllerPeriod.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointPID.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointPID.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointPID.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointPID.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointPositionTarget.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointPositionTarget.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointPositionTarget.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointPositionTarget.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/JointVelocityTarget.h b/scenario/src/gazebo/include/scenario/gazebo/components/JointVelocityTarget.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/JointVelocityTarget.h rename to scenario/src/gazebo/include/scenario/gazebo/components/JointVelocityTarget.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/SimulatedTime.h b/scenario/src/gazebo/include/scenario/gazebo/components/SimulatedTime.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/SimulatedTime.h rename to scenario/src/gazebo/include/scenario/gazebo/components/SimulatedTime.h diff --git a/scenario/gazebo/include/scenario/gazebo/components/Timestamp.h b/scenario/src/gazebo/include/scenario/gazebo/components/Timestamp.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/components/Timestamp.h rename to scenario/src/gazebo/include/scenario/gazebo/components/Timestamp.h diff --git a/scenario/gazebo/include/scenario/gazebo/exceptions.h b/scenario/src/gazebo/include/scenario/gazebo/exceptions.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/exceptions.h rename to scenario/src/gazebo/include/scenario/gazebo/exceptions.h diff --git a/scenario/gazebo/include/scenario/gazebo/helpers.h b/scenario/src/gazebo/include/scenario/gazebo/helpers.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/helpers.h rename to scenario/src/gazebo/include/scenario/gazebo/helpers.h diff --git a/scenario/gazebo/include/scenario/gazebo/utils.h b/scenario/src/gazebo/include/scenario/gazebo/utils.h similarity index 100% rename from scenario/gazebo/include/scenario/gazebo/utils.h rename to scenario/src/gazebo/include/scenario/gazebo/utils.h diff --git a/scenario/gazebo/src/GazeboSimulator.cpp b/scenario/src/gazebo/src/GazeboSimulator.cpp similarity index 100% rename from scenario/gazebo/src/GazeboSimulator.cpp rename to scenario/src/gazebo/src/GazeboSimulator.cpp diff --git a/scenario/gazebo/src/Joint.cpp b/scenario/src/gazebo/src/Joint.cpp similarity index 100% rename from scenario/gazebo/src/Joint.cpp rename to scenario/src/gazebo/src/Joint.cpp diff --git a/scenario/gazebo/src/Link.cpp b/scenario/src/gazebo/src/Link.cpp similarity index 100% rename from scenario/gazebo/src/Link.cpp rename to scenario/src/gazebo/src/Link.cpp diff --git a/scenario/gazebo/src/Model.cpp b/scenario/src/gazebo/src/Model.cpp similarity index 100% rename from scenario/gazebo/src/Model.cpp rename to scenario/src/gazebo/src/Model.cpp diff --git a/scenario/gazebo/src/World.cpp b/scenario/src/gazebo/src/World.cpp similarity index 100% rename from scenario/gazebo/src/World.cpp rename to scenario/src/gazebo/src/World.cpp diff --git a/scenario/gazebo/src/helpers.cpp b/scenario/src/gazebo/src/helpers.cpp similarity index 100% rename from scenario/gazebo/src/helpers.cpp rename to scenario/src/gazebo/src/helpers.cpp diff --git a/scenario/gazebo/src/utils.cpp b/scenario/src/gazebo/src/utils.cpp similarity index 100% rename from scenario/gazebo/src/utils.cpp rename to scenario/src/gazebo/src/utils.cpp diff --git a/scenario/plugins/CMakeLists.txt b/scenario/src/plugins/CMakeLists.txt similarity index 100% rename from scenario/plugins/CMakeLists.txt rename to scenario/src/plugins/CMakeLists.txt diff --git a/scenario/plugins/ControllerRunner/CMakeLists.txt b/scenario/src/plugins/ControllerRunner/CMakeLists.txt similarity index 100% rename from scenario/plugins/ControllerRunner/CMakeLists.txt rename to scenario/src/plugins/ControllerRunner/CMakeLists.txt diff --git a/scenario/plugins/ControllerRunner/ControllerRunner.cpp b/scenario/src/plugins/ControllerRunner/ControllerRunner.cpp similarity index 100% rename from scenario/plugins/ControllerRunner/ControllerRunner.cpp rename to scenario/src/plugins/ControllerRunner/ControllerRunner.cpp diff --git a/scenario/plugins/ControllerRunner/ControllerRunner.h b/scenario/src/plugins/ControllerRunner/ControllerRunner.h similarity index 100% rename from scenario/plugins/ControllerRunner/ControllerRunner.h rename to scenario/src/plugins/ControllerRunner/ControllerRunner.h diff --git a/scenario/plugins/ControllerRunner/ControllersFactory.cpp b/scenario/src/plugins/ControllerRunner/ControllersFactory.cpp similarity index 100% rename from scenario/plugins/ControllerRunner/ControllersFactory.cpp rename to scenario/src/plugins/ControllerRunner/ControllersFactory.cpp diff --git a/scenario/plugins/ControllerRunner/ControllersFactory.h b/scenario/src/plugins/ControllerRunner/ControllersFactory.h similarity index 100% rename from scenario/plugins/ControllerRunner/ControllersFactory.h rename to scenario/src/plugins/ControllerRunner/ControllersFactory.h diff --git a/scenario/plugins/ECMProvider/CMakeLists.txt b/scenario/src/plugins/ECMProvider/CMakeLists.txt similarity index 100% rename from scenario/plugins/ECMProvider/CMakeLists.txt rename to scenario/src/plugins/ECMProvider/CMakeLists.txt diff --git a/scenario/plugins/ECMProvider/ECMProvider.cpp b/scenario/src/plugins/ECMProvider/ECMProvider.cpp similarity index 100% rename from scenario/plugins/ECMProvider/ECMProvider.cpp rename to scenario/src/plugins/ECMProvider/ECMProvider.cpp diff --git a/scenario/plugins/ECMProvider/ECMSingleton.cpp b/scenario/src/plugins/ECMProvider/ECMSingleton.cpp similarity index 100% rename from scenario/plugins/ECMProvider/ECMSingleton.cpp rename to scenario/src/plugins/ECMProvider/ECMSingleton.cpp diff --git a/scenario/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMProvider.h b/scenario/src/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMProvider.h similarity index 100% rename from scenario/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMProvider.h rename to scenario/src/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMProvider.h diff --git a/scenario/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMSingleton.h b/scenario/src/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMSingleton.h similarity index 100% rename from scenario/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMSingleton.h rename to scenario/src/plugins/ECMProvider/include/scenario/plugins/gazebo/ECMSingleton.h diff --git a/scenario/plugins/JointController/CMakeLists.txt b/scenario/src/plugins/JointController/CMakeLists.txt similarity index 100% rename from scenario/plugins/JointController/CMakeLists.txt rename to scenario/src/plugins/JointController/CMakeLists.txt diff --git a/scenario/plugins/JointController/JointController.cpp b/scenario/src/plugins/JointController/JointController.cpp similarity index 100% rename from scenario/plugins/JointController/JointController.cpp rename to scenario/src/plugins/JointController/JointController.cpp diff --git a/scenario/plugins/JointController/JointController.h b/scenario/src/plugins/JointController/JointController.h similarity index 100% rename from scenario/plugins/JointController/JointController.h rename to scenario/src/plugins/JointController/JointController.h diff --git a/scenario/plugins/Physics/CMakeLists.txt b/scenario/src/plugins/Physics/CMakeLists.txt similarity index 100% rename from scenario/plugins/Physics/CMakeLists.txt rename to scenario/src/plugins/Physics/CMakeLists.txt diff --git a/scenario/plugins/Physics/EntityFeatureMap.hh b/scenario/src/plugins/Physics/EntityFeatureMap.hh similarity index 100% rename from scenario/plugins/Physics/EntityFeatureMap.hh rename to scenario/src/plugins/Physics/EntityFeatureMap.hh diff --git a/scenario/plugins/Physics/Physics.cc b/scenario/src/plugins/Physics/Physics.cc similarity index 100% rename from scenario/plugins/Physics/Physics.cc rename to scenario/src/plugins/Physics/Physics.cc diff --git a/scenario/plugins/Physics/Physics.hh b/scenario/src/plugins/Physics/Physics.hh similarity index 100% rename from scenario/plugins/Physics/Physics.hh rename to scenario/src/plugins/Physics/Physics.hh