Imported Upstream version 1.25.0
[platform/core/ml/nnfw.git] / compiler / loco / 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 add_library(loco SHARED ${SOURCES})
6 target_include_directories(loco PUBLIC include)
7 # TODO Remove dependencies on angkor library
8 target_link_libraries(loco PUBLIC angkor)
9 # Let's apply nncc common compile options
10 #
11 # NOTE This will enable strict compilation (warnings as error).
12 #      Please refer to the top-level CMakeLists.txt for details
13 target_link_libraries(loco PRIVATE nncc_common)
14 target_link_libraries(loco PUBLIC nncc_coverage)
15 # Q. HOW TO MAKE DEV PACKAGE(?)
16 install(TARGETS loco DESTINATION lib)
17 install(DIRECTORY include/ DESTINATION include
18         FILES_MATCHING PATTERN "*.h" PATTERN "*.lst")
19
20 if(NOT ENABLE_TEST)
21   return()
22 endif(NOT ENABLE_TEST)
23
24 # Google Test is mandatory for internal testing
25 nnas_find_package(GTest REQUIRED)
26
27 GTest_AddTest(loco_test ${TESTS})
28 target_link_libraries(loco_test loco)