jmasterx/Agui

Allegro backend files try to use headers, that don't exist in specified path

Opened this issue · 5 comments

I tried to compile the project and I got the following error:
C:\aguitestingsite\aguitestingsite\lib\agui\src\Agui\Backends\Allegro5\Allegro5Font.cpp(41,10): fatal error C1083: Cannot open file include: 'Agui/Backends/Allegro5/Allegro5Font.hpp': No such file or directory

I checked the file structure and it appears, that the correct files are somewhere else. What should I do? Should I set additional include directory for the project?

up

Simply add include to your include search path :)

The Agui CMake script does this - target_include_directories(agui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) - so I guess we need to do that as well, if we want to make use of the library.

I actually tried this, and I had to modify the Allegro backend CMake script a tiny bit:

  add_library(agui STATIC ${AGUI_SOURCES})
  target_include_directories(agui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
  include_directories(agui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)

I am not sure what function target_include_directories has, but the compiler shut up when adding the include_directories line.

I have the same issue and this lines in CMake script don't help me

I solved this problem. After "cmake" and before "cmake --build", I added path to Allegro 5 includes folder to all "AdditionalIncludeDirectories" entries in agui_allegro5.vcxproj