1 SET(fw_test "${fw_name}_test")
4 pkg_check_modules(${fw_test} REQUIRED glib-2.0)
5 FOREACH(flag ${${fw_test}_CFLAGS})
6 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
9 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
10 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
12 aux_source_directory(. sources)
13 FOREACH(src ${sources})
14 GET_FILENAME_COMPONENT(src_name ${src} NAME_WE)
15 MESSAGE("${src_name}")
16 ADD_EXECUTABLE(${src_name} ${src})
17 TARGET_LINK_LIBRARIES(${src_name} ${fw_name} ${${fw_test}_LDFLAGS})
20 INSTALL(TARGETS tethering_test RUNTIME DESTINATION bin/)