Use include_directories

This commit is contained in:
Patricia Aas 2020-11-29 19:17:23 +01:00
parent 23bc01fa38
commit fe03c440fb
5 changed files with 8 additions and 6 deletions

View file

@ -2,7 +2,7 @@ conan_cmake_run(CONANFILE conanfile.py BASIC_SETUP CMAKE_TARGETS BUILD missing)
find_package(sdl2 REQUIRED) find_package(sdl2 REQUIRED)
find_package(sdl2_image 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(lib)
add_subdirectory(src) add_subdirectory(src)

View file

@ -1,4 +1,4 @@
#include "../lib/Game.hpp" #include "Game.hpp"
extern "C" int main([[maybe_unused]] int argc, [[maybe_unused]] char * argv[]) { extern "C" int main([[maybe_unused]] int argc, [[maybe_unused]] char * argv[]) {
Game game; Game game;

View file

@ -1,5 +1,5 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "../lib/PacMan.hpp" #include "PacMan.hpp"
TEST(PacManTest, InitialPosition) { TEST(PacManTest, InitialPosition) {
Board board; Board board;

View file

@ -9,6 +9,8 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
include_directories(lib)
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(test) add_subdirectory(test)

View file

@ -1,6 +1,6 @@
#include <QApplication> #include <QApplication>
#include <QPushButton> #include <QPushButton>
#include "../lib/Pomodoro.hpp" #include "Pomodoro.hpp"
int main(int argc, char * argv[]) { int main(int argc, char * argv[]) {
QApplication app(argc, argv); QApplication app(argc, argv);