Skip to content

Instantly share code, notes, and snippets.

@zaerl
Created March 14, 2024 07:58
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 zaerl/6784741bcbc0f5c5ee1efd478eb83ba5 to your computer and use it in GitHub Desktop.
Save zaerl/6784741bcbc0f5c5ee1efd478eb83ba5 to your computer and use it in GitHub Desktop.
cmake_minimum_required(VERSION 3.0)
project(MyProject)
# Add all .c files in the src directory to the list of source files
file(GLOB SOURCES "src/*.c")
# Include the headers directory
include_directories("src")
# Create the executable target
add_executable(main ${SOURCES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment