blob: 4896e6710f447098273a423a30bd629484a7c51f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
if(NOT BUILD_STYLE_TRANSFER_APP)
return()
endif(NOT BUILD_STYLE_TRANSFER_APP)
if(NOT BUILD_ONERT)
return()
endif(NOT BUILD_ONERT)
find_package(JPEG)
if(JPEG_FOUND)
add_definitions(-DNNFW_ST_APP_JPEG_SUPPORTED)
else(JPEG_FOUND)
message(WARNING "JPEG not found.")
endif(JPEG_FOUND)
list(APPEND STYLE_TRANSFER_APP_SRCS "src/style_transfer_app.cc")
list(APPEND STYLE_TRANSFER_APP_SRCS "src/args.cc")
list(APPEND STYLE_TRANSFER_APP_SRCS "src/bitmap_helper.cc")
if(JPEG_FOUND)
list(APPEND STYLE_TRANSFER_APP_SRCS "src/jpeg_helper.cc")
endif(JPEG_FOUND)
nnas_find_package(Boost REQUIRED)
add_executable(style_transfer_app ${STYLE_TRANSFER_APP_SRCS})
target_include_directories(style_transfer_app PRIVATE src)
target_include_directories(style_transfer_app PRIVATE ${Boost_INCLUDE_DIRS})
if(JPEG_FOUND)
target_include_directories(style_transfer_app PRIVATE ${JPEG_INCLUDE_DIRS})
endif(JPEG_FOUND)
target_link_libraries(style_transfer_app onert_core onert tflite_loader)
target_link_libraries(style_transfer_app tensorflow-lite ${LIB_PTHREAD} dl nnfw_lib_tflite)
target_link_libraries(style_transfer_app nnfw-dev)
target_link_libraries(style_transfer_app boost_program_options boost_system boost_filesystem)
if(JPEG_FOUND)
target_link_libraries(style_transfer_app ${JPEG_LIBRARIES})
endif(JPEG_FOUND)
install(TARGETS style_transfer_app DESTINATION bin)
|