cmake setup
This commit is contained in:
parent
612c7c56e2
commit
77d1cbf935
6 changed files with 21 additions and 4 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Clangd
|
||||
/.cache
|
||||
|
||||
/build
|
||||
9
CMakeLists.txt
Normal file
9
CMakeLists.txt
Normal 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)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
-xc
|
||||
-std=c89
|
||||
3
pkg/common/CMakeLists.txt
Normal file
3
pkg/common/CMakeLists.txt
Normal 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
5
pkg/fs/CMakeLists.txt
Normal 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)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
bin_PROGRAMS = hello
|
||||
hello_SOURCES = copymove.c
|
||||
Loading…
Add table
Add a link
Reference in a new issue