CMAKELISTS: A pullable api now

This commit is contained in:
2026-10-14 10:31:31 -04:00
parent 4ea742946a
commit f3e416fa68
5 changed files with 140 additions and 8 deletions
+14 -6
View File
@@ -1,12 +1,20 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 4.4.3)
project(libstr LANGUAGES C)
set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include_directories(include)
project(libstr LANGUAGES C)
set(SOURCES
src/main.c
add_library(libstr STATIC
src/string.c
# src/utils.c
# Add other modular string implementation units here as you expand:
)
add_executable(libstr ${SOURCES})
target_include_directories(libstr
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)
add_executable(libstr_bin src/main.c)
set_target_properties(libstr_bin PROPERTIES OUTPUT_NAME "libstr")
target_link_libraries(libstr_bin PRIVATE libstr)