Closed jasonmeverett closed 3 years ago
This is solved. Solution is CMAKE file below:
add_subdirectory(entityx)
find_library(entityx REQUIRED HINTS build/entityx)
add_subdirectory(pybind11)
pybind11_add_module(Modeller
src/world.cpp
src/CMD.cpp
src/sim.cpp
src/output.cpp
src/pyinterface.cpp
src/integrator.cpp
src/Modeller.cpp
src/example1.cpp
)
set_target_properties(entityx PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(Modeller PRIVATE entityx)
target_include_directories(Modeller PUBLIC
"${PROJECT_SOURCE_DIR}/eigen"
"${PROJECT_SOURCE_DIR}/entityx"
"${PROJECT_SOURCE_DIR}/pybind11/include"
"${PROJECT_SOURCE_DIR}/include"
)
Using the CMAKE system, I have the following as my
CMakeLists.txt
file:I also have the entire entityx/ directory at the root of my project.
This is
src/testing.cpp
:Error output is as follows:
The errors continue on but all take the same form as the error seen in the last lines above.
What is going on here? It does look like the target is being built, but then not being linked properly? Any help is appreciated.