add_library(utils-lib STATIC "") set(UTILS_LIB_HEADERS utils.h ) set(UTILS_LIB_SOURCES utils.cpp ) target_sources(utils-lib PRIVATE ${UTILS_LIB_SOURCES} PUBLIC FILE_SET HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR} FILES ${UTILS_LIB_HEADERS} )