From a155751702b79e31c414dce8de779797628cda26 Mon Sep 17 00:00:00 2001 From: Martina Gloria Date: Fri, 24 Nov 2023 10:34:49 +0100 Subject: [PATCH 1/2] Install ergoCubEmotions application even with COMPILE_ergoCubEmotions off --- CMakeLists.txt | 2 ++ app/CMakeLists.txt | 8 ++++++++ app/ergoCubEmotions/CMakeLists.txt | 14 ++++++++++++++ .../app => app/ergoCubEmotions}/conf/config.ini | 0 .../ergoCubEmotions}/scripts/emotionHandler.xml | 0 src/modules/ergoCubEmotions/CMakeLists.txt | 2 -- 6 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 app/CMakeLists.txt create mode 100644 app/ergoCubEmotions/CMakeLists.txt rename {src/modules/ergoCubEmotions/app => app/ergoCubEmotions}/conf/config.ini (100%) rename {src/modules/ergoCubEmotions/app => app/ergoCubEmotions}/scripts/emotionHandler.xml (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1838286b..5c85acf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,8 @@ if (BUILD_TESTING) add_subdirectory(tests) endif() +add_subdirectory(app) + if(COMPILE_ergoCubEmotions) add_subdirectory(src) endif() diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt new file mode 100644 index 00000000..4adf2871 --- /dev/null +++ b/app/CMakeLists.txt @@ -0,0 +1,8 @@ +################################################################################ +# # +# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) # +# All Rights Reserved. # +# # +################################################################################ + +add_subdirectory(ergoCubEmotions) \ No newline at end of file diff --git a/app/ergoCubEmotions/CMakeLists.txt b/app/ergoCubEmotions/CMakeLists.txt new file mode 100644 index 00000000..5797cacc --- /dev/null +++ b/app/ergoCubEmotions/CMakeLists.txt @@ -0,0 +1,14 @@ +################################################################################ +# # +# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) # +# All Rights Reserved. # +# # +################################################################################ + +project(ergoCubEmotions) +cmake_minimum_required(VERSION 3.12) + +find_package(YARP 3.7.2 REQUIRED) + +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/conf/config.ini DESTINATION ${YARP_CONTEXTS_INSTALL_DIR}/${PROJECT_NAME}) +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/emotionHandler.xml DESTINATION ${YARP_APPLICATIONS_INSTALL_DIR}/${PROJECT_NAME}) \ No newline at end of file diff --git a/src/modules/ergoCubEmotions/app/conf/config.ini b/app/ergoCubEmotions/conf/config.ini similarity index 100% rename from src/modules/ergoCubEmotions/app/conf/config.ini rename to app/ergoCubEmotions/conf/config.ini diff --git a/src/modules/ergoCubEmotions/app/scripts/emotionHandler.xml b/app/ergoCubEmotions/scripts/emotionHandler.xml similarity index 100% rename from src/modules/ergoCubEmotions/app/scripts/emotionHandler.xml rename to app/ergoCubEmotions/scripts/emotionHandler.xml diff --git a/src/modules/ergoCubEmotions/CMakeLists.txt b/src/modules/ergoCubEmotions/CMakeLists.txt index f56d78ee..5f9a9f0c 100644 --- a/src/modules/ergoCubEmotions/CMakeLists.txt +++ b/src/modules/ergoCubEmotions/CMakeLists.txt @@ -18,8 +18,6 @@ source_group("IDL Files" FILES idl.thrift) source_group("DOC Files" FILES ${doc_files}) add_executable(${PROJECT_NAME} ergoCubEmotions.cpp ergoCubEmotions.h main.cpp idl.thrift ${IDL_GEN_FILES} ${doc_files}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/conf/config.ini DESTINATION ${YARP_CONTEXTS_INSTALL_DIR}/${PROJECT_NAME}) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/scripts/emotionHandler.xml DESTINATION ${YARP_APPLICATIONS_INSTALL_DIR}/${PROJECT_NAME}) install(DIRECTORY expressions DESTINATION ${YARP_CONTEXTS_INSTALL_DIR}/${PROJECT_NAME}) # Link the application with YARP and OpenCV libraries From 8340017acaa56dd1eaa3941fc57ccd4dd1a7037e Mon Sep 17 00:00:00 2001 From: Martina Gloria Date: Mon, 11 Dec 2023 11:51:03 +0100 Subject: [PATCH 2/2] Add find_package(YARP) in the root CMakeLists.txt --- CMakeLists.txt | 2 ++ README.md | 4 ++++ app/ergoCubEmotions/CMakeLists.txt | 16 +++++----------- src/CMakeLists.txt | 12 ++++++------ src/modules/CMakeLists.txt | 12 ++++++------ src/modules/ergoCubEmotions/CMakeLists.txt | 12 +++++------- 6 files changed, 28 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c85acf0..9049ac3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,8 @@ cmake_minimum_required(VERSION 3.12) project(ergocub-software VERSION 0.6.0) +find_package(YARP 3.7.2 REQUIRED) + # Give error if add_dependencies is called on a non-existing target if(POLICY CMP0046) cmake_policy(SET CMP0046 NEW) diff --git a/README.md b/README.md index 5018ab1e..ac6bc8f3 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ Main collector of ergoCub specific SW ## Installation +### Dependencies + +Before installing `ergocub-software`, please be sure that you've installed [YARP](https://www.yarp.it/latest//) on your machine. + ### Compiling from source For installing it just: diff --git a/app/ergoCubEmotions/CMakeLists.txt b/app/ergoCubEmotions/CMakeLists.txt index 5797cacc..0148259d 100644 --- a/app/ergoCubEmotions/CMakeLists.txt +++ b/app/ergoCubEmotions/CMakeLists.txt @@ -1,14 +1,8 @@ -################################################################################ -# # -# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) # -# All Rights Reserved. # -# # -################################################################################ - -project(ergoCubEmotions) -cmake_minimum_required(VERSION 3.12) - -find_package(YARP 3.7.2 REQUIRED) +# Copyright (C) 2006-2022 Istituto Italiano di Tecnologia (IIT) +# All rights reserved. +# +# This software may be modified and distributed under the terms of the +# BSD-3-Clause license. See the accompanying LICENSE file for details. install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/conf/config.ini DESTINATION ${YARP_CONTEXTS_INSTALL_DIR}/${PROJECT_NAME}) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/emotionHandler.xml DESTINATION ${YARP_APPLICATIONS_INSTALL_DIR}/${PROJECT_NAME}) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa713b75..e99900ec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ -################################################################################ -# # -# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) # -# All Rights Reserved. # -# # -################################################################################ +# Copyright (C) 2006-2022 Istituto Italiano di Tecnologia (IIT) +# All rights reserved. +# +# This software may be modified and distributed under the terms of the +# BSD-3-Clause license. See the accompanying LICENSE file for details. + add_subdirectory(modules) diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index f10c1279..79ebdfb1 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -1,7 +1,7 @@ -################################################################################ -# # -# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) # -# All Rights Reserved. # -# # -################################################################################ +# Copyright (C) 2006-2022 Istituto Italiano di Tecnologia (IIT) +# All rights reserved. +# +# This software may be modified and distributed under the terms of the +# BSD-3-Clause license. See the accompanying LICENSE file for details. + add_subdirectory(ergoCubEmotions) diff --git a/src/modules/ergoCubEmotions/CMakeLists.txt b/src/modules/ergoCubEmotions/CMakeLists.txt index 5f9a9f0c..b9db20b0 100644 --- a/src/modules/ergoCubEmotions/CMakeLists.txt +++ b/src/modules/ergoCubEmotions/CMakeLists.txt @@ -1,14 +1,12 @@ -################################################################################ -# # -# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) # -# All Rights Reserved. # -# # -################################################################################ +# Copyright (C) 2006-2022 Istituto Italiano di Tecnologia (IIT) +# All rights reserved. +# +# This software may be modified and distributed under the terms of the +# BSD-3-Clause license. See the accompanying LICENSE file for details. project(ergoCubEmotions) cmake_minimum_required(VERSION 3.12) -find_package(YARP 3.7.2 REQUIRED) find_package(OpenCV 4.2.0 REQUIRED) set(doc_files ${PROJECT_NAME}.xml)