cmake setup

This commit is contained in:
maelstrom 2026-05-21 19:28:19 +02:00
commit 77d1cbf935
6 changed files with 21 additions and 4 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
# Clangd
/.cache
/build

9
CMakeLists.txt Normal file
View file

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(onus VERSION 0.1 LANGUAGES C)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
set(CMAKE_C_STANDARD 90)
add_subdirectory(pkg/common)
add_subdirectory(pkg/fs)

View file

@ -1,2 +0,0 @@
-xc
-std=c89

View file

@ -0,0 +1,3 @@
add_library(onus_common INTERFACE)
add_library(onus::common ALIAS onus_common)
target_include_directories(onus_common INTERFACE include)

5
pkg/fs/CMakeLists.txt Normal file
View file

@ -0,0 +1,5 @@
add_library(onus_fs)
add_library(onus::fs ALIAS onus_fs)
target_sources(onus_fs PRIVATE src/copymove.c)
target_include_directories(onus_fs PUBLIC include)
target_link_libraries(onus_fs PRIVATE onus::common)

View file

@ -1,2 +0,0 @@
bin_PROGRAMS = hello
hello_SOURCES = copymove.c