cmake_minimum_required (VERSION 3.8) include_directories ("./include") # collect all files file (GLOB all_SRC "src/*.cc" "src/impl/*.cc" "src/impl/list_ports/*.cc" "include/serial/*.h" "include/serial/impl/*.h" ) # create the library add_library (serial STATIC ${all_SRC})