Skip to content

Instantly share code, notes, and snippets.

@vndmtrx
Created April 13, 2017 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vndmtrx/bafdd5ef564e8e1ccdd6b0971993baaa to your computer and use it in GitHub Desktop.
Save vndmtrx/bafdd5ef564e8e1ccdd6b0971993baaa to your computer and use it in GitHub Desktop.
Script CMake para situação onde temos várias pastas
cmake_minimum_required(VERSION 3.4)
project(teste_pasta)
#Adicionando os cabeçalhos, como o Mensagem.h no projeto
include_directories(includes)
#Podemos adicionar manualmente os fontes usando o comando abaixo:
#set(FONTES src/main.cpp src/Mensagem.cpp)
#No entanto, o comando file(GLOB...) nos permite usar wildcards para simplificar a adição de vários arquivos:
file(GLOB FONTES "src/*.cpp")
add_executable(mensagem ${FONTES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment