Skip to content

Commit

Permalink
Install ergoCubEmotions application even with COMPILE_ergoCubEmotions…
Browse files Browse the repository at this point in the history
… off (#196)
  • Loading branch information
Nicogene authored Dec 11, 2023
2 parents 54e0909 + 8340017 commit 91efee5
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -40,6 +42,8 @@ if (BUILD_TESTING)
add_subdirectory(tests)
endif()

add_subdirectory(app)

if(COMPILE_ergoCubEmotions)
add_subdirectory(src)
endif()
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
################################################################################
# #
# Copyright (C) 2023 Fondazione Istitito Italiano di Tecnologia (IIT) #
# All Rights Reserved. #
# #
################################################################################

add_subdirectory(ergoCubEmotions)
8 changes: 8 additions & 0 deletions app/ergoCubEmotions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 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})
File renamed without changes.
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
12 changes: 6 additions & 6 deletions src/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 5 additions & 9 deletions src/modules/ergoCubEmotions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -18,8 +16,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
Expand Down

0 comments on commit 91efee5

Please sign in to comment.