project(characters)
find_package(OGRE REQUIRED COMPONENTS Bites Paging Terrain CONFIG)
find_package(ZLIB)
find_package(SDL2)
find_package(assimp REQUIRED CONFIG)
find_package(OgreProcedural REQUIRED CONFIG)
find_package(pugixml REQUIRED CONFIG)
find_package(flecs REQUIRED CONFIG)
find_package(Tracy REQUIRED CONFIG)
add_executable(demo main.cpp TimeEvents.cpp)
target_link_libraries(demo OgreMain OgreBites)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources.cfg"
     DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
add_custom_command(TARGET demo POST_BUILD
     COMMAND ${CMAKE_COMMAND} -E copy_directory
         "${CMAKE_BINARY_DIR}/resources"
         "${CMAKE_CURRENT_BINARY_DIR}/resources"
     COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_SOURCE_DIR}/resources/main/jaiqua.mesh"
         "${CMAKE_CURRENT_BINARY_DIR}/resources/main/jaiqua.mesh"
     COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_SOURCE_DIR}/resources/main/jaiqua.skeleton"
         "${CMAKE_CURRENT_BINARY_DIR}/resources/main/jaiqua.skeleton"
     COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_SOURCE_DIR}/resources/main/jaiqua.material"
         "${CMAKE_CURRENT_BINARY_DIR}/resources/main/jaiqua.material"
     COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_SOURCE_DIR}/resources/main/blue_jaiqua.jpg"
         "${CMAKE_CURRENT_BINARY_DIR}/resources/main/blue_jaiqua.jpg"
     DEPENDS "${CMAKE_BINARY_DIR}/resources"
     COMMENT "Copying generated resources from root build dir to local build dir"
)

