Skip to content

Commit

Permalink
Move remaining find_package() calls to root
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Apr 13, 2018
1 parent 9c04748 commit b434344
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 21 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include(YarpInstallationHelpers)
endif()

# Find SDL and ZBar.
find_package(SDL2 REQUIRED)
find_package(SDL2_mixer REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_ttf REQUIRED)
find_package(ZBar REQUIRED)

# Find googletest sources (for unit testing).
find_package(GTestSources 1.6.0 QUIET)

# Configure installation paths for YARP resources.
yarp_configure_external_installation(rd)

Expand Down
2 changes: 0 additions & 2 deletions src/libraries/ImageLib/CMakeLists.txt
Original file line number Diff line number Diff line change
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(ZBar REQUIRED)

add_library(ImageLib ImageEventListener.hpp
ImageManager.hpp
ImageManager.cpp
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/InputLib/CMakeLists.txt
Original file line number Diff line number Diff line change
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
3 changes: 0 additions & 3 deletions src/libraries/MusicLib/CMakeLists.txt
Original file line number Diff line number Diff line change
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(SDL2 REQUIRED)
find_package(SDL2_mixer REQUIRED)

add_library(MusicLib AudioManager.hpp
AudioManager.cpp
MockAudioManager.hpp
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/UserInterfaceLib/CMakeLists.txt
Original file line number Diff line number Diff line change
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(UserInterfaceLib DeadScreen.hpp
DeadScreen.cpp
GameScreen.hpp
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/UtilsLib/CMakeLists.txt
Original file line number Diff line number Diff line change
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 Hub.hpp
Hub.cpp
SDLUtils.hpp
Expand Down
6 changes: 0 additions & 6 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
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,10 +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(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 b434344

Please sign in to comment.