diff --git a/CMakeLists.txt b/CMakeLists.txt index d10f139..471bb4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,13 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake set(YCM_TAG v0.2.2) include(YCMBootstrap) +# Find YARP. +find_package(YARP REQUIRED) + +list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH}) +include(YarpInstallationHelpers) +yarp_configure_external_installation(TEMPLATE_LOWER) + # Retrieve current TEMPLATE_NAME version. include(TEMPLATE_NAMEVersion) diff --git a/libraries/ExampleLibrary/CMakeLists.txt b/libraries/ExampleLibrary/CMakeLists.txt index 48ee8b5..7a1917c 100644 --- a/libraries/ExampleLibrary/CMakeLists.txt +++ b/libraries/ExampleLibrary/CMakeLists.txt @@ -6,9 +6,6 @@ if(ENABLE_ExampleLibrary) set(KEYWORD "ExampleLibrary") -# Find YARP. -find_package(YARP REQUIRED) - # Add current directory to global include paths, retrieve current values. set_property(GLOBAL APPEND PROPERTY TEMPLATE_NAME_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}") get_property(_common_dirs GLOBAL PROPERTY TEMPLATE_NAME_INCLUDE_DIRS) diff --git a/programs/exampleProgram/CMakeLists.txt b/programs/exampleProgram/CMakeLists.txt index 0b25325..c0c4c13 100644 --- a/programs/exampleProgram/CMakeLists.txt +++ b/programs/exampleProgram/CMakeLists.txt @@ -6,9 +6,6 @@ if(ENABLE_exampleProgram) set(KEYWORD "exampleProgram") -# Find YARP. -find_package(YARP REQUIRED) - # Retrieve global include paths and libraries. get_property(_common_dirs GLOBAL PROPERTY TEMPLATE_NAME_INCLUDE_DIRS) get_property(_exported_targets GLOBAL PROPERTY TEMPLATE_NAME_TARGETS) diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt index c99334b..55b5f6b 100644 --- a/share/CMakeLists.txt +++ b/share/CMakeLists.txt @@ -2,11 +2,5 @@ # Authors: TEMPLATE_AUTHOR # CopyPolicy: Released under the terms of the TEMPLATE_LICENSE -find_package(YARP REQUIRED) -list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH}) -include(YarpInstallationHelpers) -yarp_configure_external_installation(TEMPLATE_LOWER) - ### Go through single applications - #add_subdirectory(prog)