Skip to content

Commit

Permalink
Refactor sources listing in CMakeLists
Browse files Browse the repository at this point in the history
Moved the detailed listing of source files from src/CMakeLists.txt to main CMakeLists.txt using file(GLOB_RECURSE). This change aims to simplify the source management as it will automatically include any newly added .cpp or .hpp file, preventing the need to manually add each newly created source file into the src/CMakeLists.txt.
  • Loading branch information
dr8co committed Nov 17, 2023
1 parent b8e0ef2 commit 3fae66d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ find_package(BLAKE3 REQUIRED) # See https://github.com/BLAKE3-team/BLAKE3

# Add the executable target
add_executable(privacyShield)
add_subdirectory(src)

# Add sources for the target
file(GLOB_RECURSE PRIVACY_SHIELD_SOURCES
"${CMAKE_SOURCE_DIR}/src/*.cpp"
"${CMAKE_SOURCE_DIR}/src/*.hpp")

target_sources(privacyShield PRIVATE ${PRIVACY_SHIELD_SOURCES})

# Link dependencies
target_link_libraries(privacyShield
Expand Down
22 changes: 0 additions & 22 deletions src/CMakeLists.txt

This file was deleted.

0 comments on commit 3fae66d

Please sign in to comment.