add_executable(${TEST_NEURUN} ${TESTS})
-# NOTE This line is a workaround to resolve compilation error
-target_include_directories(${TEST_NEURUN} PRIVATE frontend/nnapi)
target_include_directories(${TEST_NEURUN} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/core/src)
-target_link_libraries(${TEST_NEURUN} ${LIB_NEURUN})
target_link_libraries(${TEST_NEURUN} neurun-core)
target_link_libraries(${TEST_NEURUN} gtest)
target_link_libraries(${TEST_NEURUN} gtest_main)
file(GLOB_RECURSE SOURCES_FRONTEND "*.cc")
+file(GLOB_RECURSE TESTS_FRONTEND "*.test.cc")
+list(REMOVE_ITEM SOURCES_FRONTEND ${TESTS_FRONTEND})
add_library(${LIB_NEURUN} SHARED ${SOURCES_FRONTEND})
target_link_libraries(${LIB_NEURUN} PUBLIC nnfw-header)
install(TARGETS ${LIB_NEURUN} DESTINATION lib)
+add_executable(test_neurun_frontend_nnapi ${TESTS_FRONTEND})
+
+target_link_libraries(test_neurun_frontend_nnapi PRIVATE ${LIB_NEURUN})
+target_link_libraries(test_neurun_frontend_nnapi PRIVATE gtest)
+target_link_libraries(test_neurun_frontend_nnapi PRIVATE gtest_main)
+
+install(TARGETS test_neurun_frontend_nnapi DESTINATION unittest)