Skip to content

Commit 720523f

Browse files
Initial CMake structure.
1 parent 7f50d02 commit 720523f

11 files changed

Lines changed: 74 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
# Project Name
4+
project(MyProject VERSION 1.0
5+
LANGUAGES CXX)
6+
7+
# Standard C++
8+
set(CMAKE_CXX_STANDARD 11)
9+
set(CMAKE_CXX_STANDARD_REQUIRED True)
10+
11+
# Add subdirectories
12+
add_subdirectory(src)
13+
add_subdirectory(examples)
14+
add_subdirectory(external)
15+
16+
# Enable testing with CTest
17+
enable_testing()

examples/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This directory will contain example applications using the project's libraries.
2+
# Add executables for each example.
3+
# Example:
4+
# add_executable(Example1 Example1.cpp)
5+
# target_link_libraries(Example1 MyProject::MyLibrary)

external/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This directory will contain external dependencies.
2+
# Use FetchContent or find_package to include them.
3+
# Example:
4+
# FetchContent_Declare(
5+
# googletest
6+
# GIT_REPOSITORY https://github.com/google/googletest.git
7+
# GIT_TAG release-1.10.0
8+
# )
9+
# FetchContent_MakeAvailable(googletest)

src/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Add subdirectories for components, connectors, drivers, mediators, test, and utilities
2+
add_subdirectory(components)
3+
add_subdirectory(connectors)
4+
add_subdirectory(drivers)
5+
add_subdirectory(include)
6+
add_subdirectory(mediators)
7+
add_subdirectory(test)
8+
add_subdirectory(utilities)

src/components/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This directory will contain the source code for different components of the project.
2+
# Add libraries or executables for each component.
3+
# Example:
4+
# add_library(MyComponent MyComponent.cpp)
5+
# target_include_directories(MyComponent PUBLIC ../include)

src/connectors/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This directory will contain the source code for different connectors.
2+
# Add libraries or executables for each connector.
3+
# Example:
4+
# add_library(MyConnector MyConnector.cpp)
5+
# target_include_directories(MyConnector PUBLIC ../include)

src/drivers/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This directory will contain the source code for different drivers.
2+
# Add libraries or executables for each driver.
3+
# Example:
4+
# add_library(MyDriver MyDriver.cpp)
5+
# target_include_directories(MyDriver PUBLIC ../include)

src/include/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This directory will contain the public header files for the project.
2+
# Use target_include_directories in other CMakeLists.txt files to make these headers available.
3+
# Example:
4+
# target_include_directories(MyLibrary PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

src/mediators/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This directory will contain the source code for different mediators.
2+
# Add libraries or executables for each mediator.
3+
# Example:
4+
# add_library(MyMediator MyMediator.cpp)
5+
# target_include_directories(MyMediator PUBLIC ../include)

src/test/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This directory will contain test code for the project.
2+
# Add tests using add_test and link against a testing framework like GoogleTest.
3+
# Example:
4+
# add_executable(MyTest MyTest.cpp)
5+
# target_link_libraries(MyTest MyProject::MyLibrary GTest::GTestMain)
6+
# add_test(NAME MyTest COMMAND MyTest)

0 commit comments

Comments
 (0)