Initial commit
Some checks failed
CI / build-and-analyze (push) Failing after 33s

This commit is contained in:
2026-07-26 09:37:43 +03:00
commit 13a4452758
13 changed files with 965 additions and 0 deletions

39
CMakeLists.txt Normal file
View File

@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.10)
project(CgeFile LANGUAGES C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(SOURCES)
set(SOURCES_WIN32
src/win32/File.c
)
set(SOURCES_POSIX
src/posix/File.c
)
set(HEADERS
CgeFile.h
)
if(WIN32)
message(STATUS "Platform - Win32")
list(APPEND SOURCES ${SOURCES_WIN32})
elseif(UNIX)
message(STATUS "Platform: Unix (Linux/BSD/MacOS X)")
list(APPEND SOURCES ${SOURCES_POSIX})
endif()
add_library(CgeFile STATIC ${SOURCES} ${HEADERS})
target_include_directories(CgeFile PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
install(TARGETS CgeFile
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(FILES ${HEADERS} DESTINATION include)