Compare commits

...

2 commits

Author SHA1 Message Date
Mineplay5780
c102040831 fix(cmake): removed uppercase letters from file paths 2025-11-27 19:51:11 +01:00
Mineplay5780
96a120e74e build(cmake): setup cmake build file 2025-11-27 19:48:19 +01:00
2 changed files with 21 additions and 0 deletions

1
.gitignore vendored
View file

@ -66,3 +66,4 @@ CTestTestfile.cmake
_deps _deps
CMakeUserPresets.json CMakeUserPresets.json
./build

20
CMakeLists.txt Normal file
View file

@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.10)
project(cosms-core C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
include_directories(${PROJECT_SOURCE_DIR}/include)
file(GLOB_RECURSE SRC_FILES "${PROJECT_SOURCE_DIR}/src/*.c")
add_library(cosms-core STATIC ${SRC_FILES})
add_executable(cosms-core-test ${PROJECT_SOURCE_DIR}/tests/main.c)
target_include_directories(cosms-core-test PRIVATE ${PROJECT_SOURCE_DIR}/tests)
target_link_libraries(cosms-core-test cosms-core)
if (MSVC)
target_compile_options(cosms-core PRIVATE /W4 /Zl)
else()
target_compile_options(cosms-core PRIVATE -wall -Wextra -pedantic)
endif()