28 lines
545 B
CMake
28 lines
545 B
CMake
cmake_minimum_required(VERSION 3.5.0)
|
|
project(Test_Project VERSION 0.1.0 LANGUAGES C)
|
|
|
|
# Add more c files in here
|
|
# add_executable(Test_Project
|
|
# main.c
|
|
# hello.c
|
|
# math_functions.c
|
|
# struct_test.c
|
|
# )
|
|
|
|
add_executable(Test_Project
|
|
src/main.c
|
|
src/hello.c
|
|
src/math_functions.c
|
|
src/struct_test.c
|
|
src/pointer_test.c
|
|
src/read_file.c
|
|
)
|
|
|
|
# https://discourse.cmake.org/t/how-to-properly-include-header-files/4762
|
|
|
|
# Add header files in here, not sure if I did this right.
|
|
target_include_directories(Test_Project
|
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
)
|