Skip to content

Commit

Permalink
Move find_package() calls to root list file
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Sep 4, 2018
1 parent f372cd0 commit 45d01fa
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 42 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Expand Up @@ -40,6 +40,16 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake
find_package(YCM REQUIRED)
find_package(COLOR_DEBUG REQUIRED)
find_package(ASROB_YARP_DEVICES REQUIRED)
find_package(YARP REQUIRED)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_mixer REQUIRED)
find_package(SDL2_ttf REQUIRED)
find_package(ZBar REQUIRED)

# Find project's soft dependencies.
find_package(Doxygen QUIET)
find_package(GTestSources 1.6.0 QUIET)

# Standard installation directories.
include(GNUInstallDirs)
Expand Down Expand Up @@ -70,8 +80,6 @@ add_subdirectory(src)
add_subdirectory(tests)

# Generate documentation.
find_package(Doxygen QUIET)

cmake_dependent_option(GENERATE_doc_html "Choose if you want to generate HTML documentation through Doxygen" OFF
DOXYGEN_FOUND OFF)

Expand Down
3 changes: 0 additions & 3 deletions src/libraries/ImageLib/CMakeLists.txt
Expand Up @@ -2,9 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)
find_package(ZBar REQUIRED)

add_library(ImageLib ImageEventListener.hpp
ImageManager.hpp
ImageManager.cpp
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/InputLib/CMakeLists.txt
Expand Up @@ -2,8 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(SDL2 REQUIRED)

add_library(InputLib InputEventListener.hpp
InputManager.hpp
InputManager.cpp
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/MusicLib/CMakeLists.txt
Expand Up @@ -2,10 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)
find_package(SDL2 REQUIRED)
find_package(SDL2_mixer REQUIRED)

add_library(MusicLib AudioManager.hpp
AudioManager.cpp
MockAudioManager.hpp
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/NetworkLib/CMakeLists.txt
Expand Up @@ -2,8 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)

add_library(NetworkLib MockNetworkEventListener.hpp
MockNetworkEventListener.cpp
MockNetworkManager.hpp
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/RobotLib/CMakeLists.txt
Expand Up @@ -2,8 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)

add_library(RobotLib MockRobotManager.cpp
MockRobotManager.hpp)

Expand Down
2 changes: 0 additions & 2 deletions src/libraries/ServerLib/CMakeLists.txt
Expand Up @@ -2,8 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)

add_library(ServerLib RpcResponder.hpp
RpcResponder.cpp
Server.hpp
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/StateMachineLib/CMakeLists.txt
Expand Up @@ -2,8 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)

add_library(StateMachineLib MockState.hpp
MockState.cpp
State.hpp
Expand Down
6 changes: 0 additions & 6 deletions src/libraries/UserInterfaceLib/CMakeLists.txt
Expand Up @@ -2,12 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(YARP REQUIRED)

find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_ttf REQUIRED)

add_library(UserInterfaceLib DeadScreen.hpp
DeadScreen.cpp
GameScreen.hpp
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/UtilsLib/CMakeLists.txt
Expand Up @@ -2,10 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_ttf REQUIRED)

add_library(UtilsLib ManagerHub.hpp
ManagerHub.cpp
SDLUtils.hpp
Expand Down
3 changes: 0 additions & 3 deletions src/programs/rdServer/CMakeLists.txt
Expand Up @@ -6,9 +6,6 @@ option(ENABLE_rdServer "Choose if you want to compile rdServer" ON)

if(ENABLE_rdServer)

# Find YARP. Point the YARP_DIR environment variable at your build.
find_package(YARP REQUIRED)

# Set up our main executable.
add_executable(rdServer main.cpp)

Expand Down
3 changes: 0 additions & 3 deletions src/programs/robotDevastation/CMakeLists.txt
Expand Up @@ -6,9 +6,6 @@ option(ENABLE_robotDevastation "Choose if you want to compile robotDevastation"

if(ENABLE_robotDevastation)

# Find YARP. Point the YARP_DIR environment variable at your build.
find_package(YARP REQUIRED)

add_executable(robotDevastation main.cpp
RobotDevastation.hpp
RobotDevastation.cpp)
Expand Down
7 changes: 0 additions & 7 deletions tests/CMakeLists.txt
Expand Up @@ -2,8 +2,6 @@
# CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
# URL: https://github.com/asrob-uc3m/robotDevastation

find_package(GTestSources 1.6.0 QUIET)

if(NOT GTestSources_FOUND AND (NOT DEFINED ENABLE_tests OR ENABLE_tests))
message(WARNING "GTestSources package not found, disabling tests")
endif()
Expand All @@ -16,11 +14,6 @@ if(ENABLE_tests)
set(gtest_force_shared_crt ON CACHE INTERNAL "") # needed for Windows
add_subdirectory(${GTestSources_SOURCE_DIR} ${CMAKE_BINARY_DIR}/gtest)

find_package(YARP REQUIRED)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_ttf REQUIRED)

include_directories(${GTestSources_INCLUDE_DIR})

if(WIN32)
Expand Down

0 comments on commit 45d01fa

Please sign in to comment.