Imported Upstream version 1.18.0
[platform/core/ml/nnfw.git] / compiler / luci / profile / 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 LIBRARY_TYPE)
6   set(LIBRARY_TYPE "SHARED")
7 endif(NOT LIBRARY_TYPE)
8
9 add_library(luci_profile ${LIBRARY_TYPE} ${SOURCES})
10 target_include_directories(luci_profile PRIVATE src)
11 target_include_directories(luci_profile PUBLIC include)
12 target_link_libraries(luci_profile PUBLIC loco)
13 target_link_libraries(luci_profile PUBLIC luci_lang)
14
15 install(TARGETS luci_profile 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_profile_test ${TESTS})
26 target_include_directories(luci_profile_test PRIVATE src)
27 target_link_libraries(luci_profile_test luci_lang)
28 target_link_libraries(luci_profile_test luci_profile)