cmake_tutorial/libs/lib2/CMakeLists.txt
2025-07-03 17:29:32 +02:00

10 lines
415 B
CMake

# Defines a static library target named 'lib2' from its source file.
add_library(lib2 STATIC src/lib2.c)
# Specifies include directories that are part of lib2's public interface.
# - PUBLIC: Means that targets linking to lib2 (like cmake_tutorialApp or lib1) will
# inherit this include path. This allows them to find lib2.h.
target_include_directories(lib2 PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/inc
)