When one adds allegro5 via add_subdirectory to a cmake project, neither does one get the required include directories set as a property on the allegro target (the preferred way), nor does one get a global cmake variable like `allegro_INCLUDE_DIRECTORIES" (the bad, oldschool way).
For now I had to hack my way around this by manually doing
target_include_directories(allegro INTERFACE <main include folder> <build include path for codegen> <list of enabled addon include folders>),
but allegro's cmakelists could and should do this target_include_directories action on its own.
Please consider adding those.
P.S.
This would make using allegro in cmake projects extremely easy via cpm.cmake:
CPMAddPackage("gh:liballeg/allegro5")
...
add_executable(myHelloWorldApp ...)
target_link_libraries(myHelloWorldApp allegro)
while as it is now I had to spend a couple hours hacking my way around the lack of include directory info.
When one adds allegro5 via
add_subdirectoryto a cmake project, neither does one get the required include directories set as a property on theallegrotarget (the preferred way), nor does one get a global cmake variable like `allegro_INCLUDE_DIRECTORIES" (the bad, oldschool way).For now I had to hack my way around this by manually doing
target_include_directories(allegro INTERFACE <main include folder> <build include path for codegen> <list of enabled addon include folders>),but allegro's cmakelists could and should do this
target_include_directoriesaction on its own.Please consider adding those.
P.S.
This would make using allegro in cmake projects extremely easy via
cpm.cmake:while as it is now I had to spend a couple hours hacking my way around the lack of include directory info.