Mediastreamer2 should require the use of a library. Is registered previously developed a new tool in the tools, should now establish a separate project.
CMake like writing project called package ???
Project name is mstest
So write CMakeLists.txt in the root directory
cmake_minimum_required(VERSION 3.6) project(mstest) find_package(Mediastreamer2 REQUIRED) set(MSTEST_INCLUDE_DIRS ${MSTEST_INCLUDE_DIRS} ${MEDIASTREAMER2_INCLUDE_DIRS} ) set(MSTEST_LDFLAGS ${MSTEST_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS} ) add_executable(ass ass.c) add_executable(s s.c) target_link_libraries(ass ${MEDIASTREAMER2_LIBRARIES}) target_link_libraries(s ${MEDIASTREAMER2_LIBRARIES})