project(lb_example_app_test C)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations -Wno-deprecated-declarations")

add_executable(lb_example_app_test test_service.c)

pkg_check_modules(LB_CORE REQUIRED lb_core)
pkg_check_modules(LB_BASE REQUIRED lb_base)
pkg_check_modules(GIO REQUIRED gio-2.0)
pkg_check_modules(TEST_CLI REQUIRED lbTest-client)

target_include_directories(lb_example_app_test PUBLIC
    inc
    ${GLIB2_INCLUDE_DIRS}
    ${TEST_CLI_INCLUDE_DIRS}
    ${LB_BASE_INCLUDE_DIRS}
    ${LB_CORE_INCLUDE_DIRS}
)
target_link_directories(lb_example_app_test PUBLIC
    ${GLIB2_LIBRARY_DIRS}
    ${TEST_CLI_LIBRARY_DIRS}
    ${LB_CORE_LIBRARY_DIRS}
)
target_link_libraries(lb_example_app_test PUBLIC
    ${GLIB2_LIBRARIES}
    ${TEST_CLI_LIBRARIES}
    ${LB_CORE_LIBRARIES}
    ${GIO_LIBRARIES}
    ${CONN_PUB_LIBRARIES}
)
install(TARGETS lb_example_app_test DESTINATION opt/litebmc/apps/lb_example_app)
