-file(GLOB_RECURSE SOURCES "src/*.cc")
+# Add cpu
+
+set(NEURUN_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
+
+set(LIB_NEURUN_BACKEND_CPU neurun_backend_cpu)
+add_subdirectory(src/backend)
+
+file(GLOB SOURCES "src/*.cc")
+file(GLOB_RECURSE SOURCES_INTERNAL "src/internal/*.cc")
+
+# TODO This must be built separately, just like "backend/cpu"
+file(GLOB_RECURSE SOURCES_BACKEND_ACL "src/backend/acl_cl/*.cc")
+
+set(SOURCES ${SOURCES} ${SOURCES_INTERNAL} ${SOURCES_BACKEND_ACL})
# NOTE For now ARMCompute is necessary
# TODO Remove required package below(should be optional)
add_library(${LIB_NEURUN} SHARED ${SOURCES})
target_include_directories(${LIB_NEURUN} PUBLIC ${NNFW_INCLUDE_DIR})
-target_include_directories(${LIB_NEURUN} PUBLIC src
- ${CMAKE_SOURCE_DIR}/externals/tensorflow)
+target_include_directories(${LIB_NEURUN} PUBLIC ${NEURUN_INCLUDE_DIR})
+target_include_directories(${LIB_NEURUN} PUBLIC ${CMAKE_SOURCE_DIR}/externals/tensorflow)
target_link_libraries(${LIB_NEURUN} arm_compute)
target_link_libraries(${LIB_NEURUN} tensorflow-lite)
target_link_libraries(${LIB_NEURUN} nnfw_util)
target_link_libraries(${LIB_NEURUN} nnfw_support_nnapi)
+
+# TODO This should be optional
+target_link_libraries(${LIB_NEURUN} ${LIB_NEURUN_BACKEND_CPU})
+
set_target_properties(${LIB_NEURUN} PROPERTIES OUTPUT_NAME neuralnetworks)
install(TARGETS ${LIB_NEURUN} DESTINATION lib/new_runtime)
--- /dev/null
+file(GLOB SOURCES "*.cc")
+
+add_library(${LIB_NEURUN_BACKEND_CPU} SHARED ${SOURCES})
+
+target_include_directories(${LIB_NEURUN_BACKEND_CPU} PUBLIC ${NNFW_INCLUDE_DIR})
+target_include_directories(${LIB_NEURUN_BACKEND_CPU} PUBLIC ${NEURUN_INCLUDE_DIR})
+target_include_directories(${LIB_NEURUN_BACKEND_CPU} PUBLIC ${CMAKE_SOURCE_DIR}/externals/tensorflow)
+
+target_link_libraries(${LIB_NEURUN_BACKEND_CPU} arm_compute) # TODO We should not need this
+target_link_libraries(${LIB_NEURUN_BACKEND_CPU} tensorflow-lite)
+target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_util)
+target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_support_nnapi)
+
+set_target_properties(${LIB_NEURUN_BACKEND_CPU} PROPERTIES OUTPUT_NAME backend_cpu)
+install(TARGETS ${LIB_NEURUN_BACKEND_CPU} DESTINATION lib/new_runtime)