# Test executables SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_CFLAGS}") add_executable(appsvc_test appsvc_test.c) target_link_libraries(appsvc_test appsvc ${pkgs_LDFLAGS}) INSTALL(TARGETS appsvc_test DESTINATION bin) ### Unit tests ### ## avatar test ## #add_library(test_avatar STATIC EXCLUDE_FROM_ALL # test_avatar.c) #target_link_libraries(test_avatar avatar_v2_lib) ## Main test function ## #add_executable(test_all EXCLUDE_FROM_ALL test.c) #target_link_libraries(test_all test_avatar) #set_target_properties(test_all # PROPERTIES SKIP_BUILD_RPATH true # ) # remove rpath option that is automatically generated by cmake. ## 'test' target in Makefile ## # Run test by 'make test' #add_custom_target(test # COMMAND ./test_all # DEPENDS test_all # WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" # COMMENT "" # )