Imported Upstream version 1.19.0
[platform/core/ml/nnfw.git] / compiler / luci / plan / CMakeLists.txt
1 file(GLOB_RECURSE SOURCES "src/*.cpp")
2 file(GLOB_RECURSE TESTS "src/*.test.cpp")
3 list(REMOVE_ITEM SOURCES ${TESTS})
4
5 if (NOT LUCI_LIBRARY_TYPE)
6     set(LUCI_LIBRARY_TYPE "SHARED")
7 endif(NOT LUCI_LIBRARY_TYPE)
8
9 add_library(luci_plan ${LUCI_LIBRARY_TYPE} ${SOURCES})
10 target_include_directories(luci_plan PRIVATE src)
11 target_include_directories(luci_plan PUBLIC include)
12 target_link_libraries(luci_plan PUBLIC loco)
13 target_link_libraries(luci_plan PUBLIC luci_lang)
14
15 install(TARGETS luci_plan DESTINATION lib)
16 install(DIRECTORY include/ DESTINATION include
17         FILES_MATCHING PATTERN "*.h")
18
19 if(NOT ENABLE_TEST)
20     return()
21 endif(NOT ENABLE_TEST)
22
23 nnas_find_package(GTest REQUIRED)
24
25 GTest_AddTest(luci_plan_test ${TESTS})
26 target_link_libraries(luci_plan_test luci_plan)