Closed asmw closed 8 years ago
CMAKE MAGIC!
Well that still doesn't include the headers file from the entityx subproject no? - So just doing
add_subdirectories(3rdparty/entityx)
target_link_libraries(my_target entityx[_shared])
shouldn't AFAIS, and on my end doesn't, include_directories
entityx.
../src/main.cc:28:10: fatal error: entityx/entityx.h: No such file or directory
#include <entityx/entityx.h>
so there's something missing here.
Actually nvm. it took me a while to realize that entityx[_shared]
is actually not valid cmake-syntax and that asmw just intended to say: entityx
or entityx_shared
.
@davidnorthetal true. I'll try to make snippets copy-pastable (or obviously non-working) the next time :)
This makes it very easy to integrate entityx into a build. I.e: add_subdirectories(3rdparty/entityx) target_link_libraries(my_target entityx[_shared])
This makes #include "entityx/entityx.h" just work.