From edee1206b829dcda6ff87f837f83d530ef67bca6 Mon Sep 17 00:00:00 2001 From: jgvictores Date: Sat, 24 Mar 2018 00:36:38 +0100 Subject: [PATCH 1/2] yarp to root, prepare for WITH_PLUGINS --- CMakeLists.txt | 19 ++++++++++++++++++- share/CMakeLists.txt | 5 ----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5cd447..3611b91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,11 +96,28 @@ set_property(GLOBAL PROPERTY ROBOTICSLAB_SPEECH_IDL_SOURCES) # Store list of exported targets in global scope. set_property(GLOBAL PROPERTY ROBOTICSLAB_SPEECH_TARGETS) +# Create targets if specific requirements are satisfied. +include(CMakeDependentOption) + +# Find YARP (main dependency). +find_package(YARP REQUIRED) + +# Load YARP modules. +if(YARP_VERSION_SHORT VERSION_LESS 2.3.70) + list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH}) + include(YarpPlugin) + include(YarpInstallationHelpers) +endif() + +# Configure installation paths for YARP resources. +yarp_configure_external_installation(roboticslab-speech WITH_PLUGINS) + # Add main contents. add_subdirectory(cmake) -add_subdirectory(share) add_subdirectory(libraries) add_subdirectory(programs) +#add_subdirectory(tests) +add_subdirectory(share) # Store the package in the user registry. export(PACKAGE ROBOTICSLAB_SPEECH) diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index 99f8046..ed8ec98 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -2,11 +2,6 @@ # Author: Juan G Victores & Raul de santos Rico # CopyPolicy: Released under the terms of the GNU GPL v2.0. -find_package(YARP REQUIRED) -list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH}) -include(YarpInstallationHelpers) -yarp_configure_external_installation(roboticslab-speech) - yarp_install(FILES ymanager.ini DESTINATION ${ROBOTICSLAB-SPEECH_DATA_INSTALL_DIR}) From 3ae073280ac038346ced8680acfd886b0c544b3d Mon Sep 17 00:00:00 2001 From: jgvictores Date: Sat, 24 Mar 2018 00:38:28 +0100 Subject: [PATCH 2/2] adapt for WITH_PLUGINS --- libraries/YarpPlugins/CMakeLists.txt | 5 ----- libraries/YarpPlugins/Espeak/CMakeLists.txt | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/libraries/YarpPlugins/CMakeLists.txt b/libraries/YarpPlugins/CMakeLists.txt index 8173ba4..644e70c 100644 --- a/libraries/YarpPlugins/CMakeLists.txt +++ b/libraries/YarpPlugins/CMakeLists.txt @@ -2,12 +2,7 @@ # Authors: Juan G. Victores & Raul de Santos Rico # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT -# Find YARP (common dependency for all devices). -find_package(YARP REQUIRED) - if(YARP_VERSION_SHORT VERSION_LESS 2.3.70) - list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH}) - include(YarpPlugin) include_directories(${YARP_INCLUDE_DIRS}) endif() diff --git a/libraries/YarpPlugins/Espeak/CMakeLists.txt b/libraries/YarpPlugins/Espeak/CMakeLists.txt index 765b449..94d3b4a 100644 --- a/libraries/YarpPlugins/Espeak/CMakeLists.txt +++ b/libraries/YarpPlugins/Espeak/CMakeLists.txt @@ -43,12 +43,12 @@ if(NOT SKIP_Espeak) yarp_install(TARGETS Espeak COMPONENT runtime - LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR} - ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}) + LIBRARY DESTINATION ${ROBOTICSLAB-SPEECH_DYNAMIC_PLUGINS_INSTALL_DIR} + ARCHIVE DESTINATION ${ROBOTICSLAB-SPEECH_STATIC_PLUGINS_INSTALL_DIR}) yarp_install(FILES Espeak.ini COMPONENT runtime - DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR}) + DESTINATION ${ROBOTICSLAB-SPEECH_PLUGIN_MANIFESTS_INSTALL_DIR}) # Already included in /share? if(NOT DEFINED ROBOTICSLAB-SPEECH_DATA_INSTALL_DIR)