c++ - CMake simple MVC structure -


i have simple question how organize simple mvc application in c++. i'm new cmake , i'm learning how use it.

imagine simple folder organization following:

folder structure

-can please tell me if structure correct? -if best way write cmake files it?

it looks pretty normal structure me. in fact use same 1 in projects. in root cmake file put: include(src/model/cmakelists.txt) , cmakelists.txt might this:

set(model_headers      src/model/model.hpp) set(model_sources     src/model/model.cpp      ${model_headers}) list(append all_sources ${model_sources}) source_group("model" files ${model_sources}) 

where all_sources variable root file later passed add_executable

repeat same subfolders , have final project.


Comments

Popular posts from this blog

xslt - Substring before throwing error -

oracle - Changing start date for system jobs related to automatic statistics collections in 11g -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -