cmake_minimum_required(VERSION 2.4) project(serialmultiplexer) set(SRC_FILES main.cpp serial_io.cpp Socket.cpp ) set(LIBS -pthread ) add_executable(${PROJECT_NAME} ${SRC_FILES}) target_link_libraries( ${PROJECT_NAME} ${LIBS}) set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS -m64 LINK_FLAGS -m64) add_definitions(" -std=c++11 -Wall -O2 -g") install(TARGETS serialmultiplexer RUNTIME DESTINATION bin)