From fe03c440fb5052d9ade44287baedd4076639fb56 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Sun, 29 Nov 2020 19:17:23 +0100 Subject: [PATCH] Use include_directories --- pacman/CMakeLists.txt | 2 +- pacman/src/main.cpp | 2 +- pacman/test/tests.cpp | 2 +- pomodoro/CMakeLists.txt | 2 ++ pomodoro/src/main.cpp | 6 +++--- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pacman/CMakeLists.txt b/pacman/CMakeLists.txt index fea05a7..9d5cd13 100644 --- a/pacman/CMakeLists.txt +++ b/pacman/CMakeLists.txt @@ -2,7 +2,7 @@ conan_cmake_run(CONANFILE conanfile.py BASIC_SETUP CMAKE_TARGETS BUILD missing) find_package(sdl2 REQUIRED) find_package(sdl2_image REQUIRED) -include_directories(${sdl2_INCLUDE_DIRS} ${sdl2_image_INCLUDE_DIRS}) +include_directories(lib ${sdl2_INCLUDE_DIRS} ${sdl2_image_INCLUDE_DIRS}) add_subdirectory(lib) add_subdirectory(src) diff --git a/pacman/src/main.cpp b/pacman/src/main.cpp index 08c4420..7fe4ad6 100644 --- a/pacman/src/main.cpp +++ b/pacman/src/main.cpp @@ -1,4 +1,4 @@ -#include "../lib/Game.hpp" +#include "Game.hpp" extern "C" int main([[maybe_unused]] int argc, [[maybe_unused]] char * argv[]) { Game game; diff --git a/pacman/test/tests.cpp b/pacman/test/tests.cpp index eb630eb..2dd698b 100644 --- a/pacman/test/tests.cpp +++ b/pacman/test/tests.cpp @@ -1,5 +1,5 @@ #include -#include "../lib/PacMan.hpp" +#include "PacMan.hpp" TEST(PacManTest, InitialPosition) { Board board; diff --git a/pomodoro/CMakeLists.txt b/pomodoro/CMakeLists.txt index 5af5682..ead10aa 100644 --- a/pomodoro/CMakeLists.txt +++ b/pomodoro/CMakeLists.txt @@ -9,6 +9,8 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) +include_directories(lib) + add_subdirectory(lib) add_subdirectory(src) add_subdirectory(test) diff --git a/pomodoro/src/main.cpp b/pomodoro/src/main.cpp index d0900e8..2442b86 100644 --- a/pomodoro/src/main.cpp +++ b/pomodoro/src/main.cpp @@ -1,10 +1,10 @@ #include #include -#include "../lib/Pomodoro.hpp" +#include "Pomodoro.hpp" int main(int argc, char * argv[]) { - QApplication app (argc, argv); - QPushButton button ("Hello world !"); + QApplication app(argc, argv); + QPushButton button("Hello world !"); Pomodoro pomodoro; button.show(); return app.exec();