cmake_minimum_required(VERSION 3.13.4) #Bring the headers, such as server_certificate.hpp into the project #include_directories(~/code/common) include_directories(/home/rock/code/advanced/server-flex/minIni) #Project name project (server_flex) #Can manually add the sources using the set command as follows: #set(SOURCES doorbell.cpp) #add_executable(doorbell doorbell.cpp) set(MainSource "/home/rock/code/advanced/server-flex/minIni") #However, the file(GLOB...) allows for wildcard additions: file(GLOB SOURCES "*.cpp" ${MainSource}/*.c) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-psabi") # set link libs set ( PROJECT_LINK_LIBS ssl crypto pthread boost_system boost_thread boost_chrono -lboost_filesystem -lserialport -lrt) add_executable(server_flex ${SOURCES}) target_link_libraries(server_flex ${PROJECT_LINK_LIBS} )