summaryrefslogtreecommitdiff
path: root/compiler/moco-tf/CMakeLists.txt
blob: 5516388a452e4a981f7fba1c2616320648624541 (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
41
42
43
44
45
46
47
48
49
50
51
if(NOT TARGET mio_tf)
  return()
endif(NOT TARGET mio_tf)

file(GLOB_RECURSE SOURCES "src/*.cpp")
file(GLOB_RECURSE TESTS "src/*.test.cpp")
list(REMOVE_ITEM SOURCES ${TESTS})

add_library(moco_tf_frontend SHARED ${SOURCES})
target_include_directories(moco_tf_frontend PRIVATE src)
target_include_directories(moco_tf_frontend PUBLIC include)
target_link_libraries(moco_tf_frontend PUBLIC loco)
target_link_libraries(moco_tf_frontend PUBLIC moco_lang)
target_link_libraries(moco_tf_frontend PUBLIC moco_import)
target_link_libraries(moco_tf_frontend PUBLIC moco_pass)
target_link_libraries(moco_tf_frontend PUBLIC mio_tf)
target_link_libraries(moco_tf_frontend PRIVATE moco_service)
target_link_libraries(moco_tf_frontend PRIVATE moco_support)
target_link_libraries(moco_tf_frontend PRIVATE bino)
target_link_libraries(moco_tf_frontend PRIVATE fipe)
target_link_libraries(moco_tf_frontend PRIVATE locop)
target_link_libraries(moco_tf_frontend PRIVATE stdex)
target_link_libraries(moco_tf_frontend PRIVATE moco_log)
target_link_libraries(moco_tf_frontend PRIVATE pepper_str)
target_link_libraries(moco_tf_frontend PRIVATE pepper_strcast)
target_link_libraries(moco_tf_frontend PRIVATE locomotiv)
target_link_libraries(moco_tf_frontend PRIVATE plier_tf)
target_link_libraries(moco_tf_frontend PRIVATE locoex_customop)
target_link_libraries(moco_tf_frontend PRIVATE logo)
target_link_libraries(moco_tf_frontend PRIVATE oops)
install(TARGETS moco_tf_frontend DESTINATION lib)

if(NOT ENABLE_TEST)
  return()
endif(NOT ENABLE_TEST)

nnas_find_package(GTest REQUIRED)

add_executable(moco_tf_frontend_test ${TESTS})
target_include_directories(moco_tf_frontend_test PRIVATE src)
target_link_libraries(moco_tf_frontend_test gtest_main)
target_link_libraries(moco_tf_frontend_test bino)
target_link_libraries(moco_tf_frontend_test fipe)
target_link_libraries(moco_tf_frontend_test locop)
target_link_libraries(moco_tf_frontend_test moco_log)
target_link_libraries(moco_tf_frontend_test moco_tf_frontend)
target_link_libraries(moco_tf_frontend_test stdex)
target_link_libraries(moco_tf_frontend_test plier_tf)
target_link_libraries(moco_tf_frontend_test locoex_customop)
target_link_libraries(moco_tf_frontend_test logo)
add_test(moco_tf_frontend_test moco_tf_frontend_test)