Update cmake files.

This commit is contained in:
2021-03-09 17:21:01 +00:00
parent 90d64abce2
commit 32043cf7a2
4 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
set(MAIN_SOURCES main.c main.h)
add_library(core ${MAIN_SOURCES})

View File

@@ -0,0 +1,16 @@
if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
return()
endif()
project(
fssetter-linux
DESCRIPTION "Filesystem test creator for Linux"
LANGUAGES C)
set(PLATFORM_SOURCES attr.c sparse.c xattr.c)
set(EXECUTABLE_NAME "fssetter-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
add_executable(${EXECUTABLE_NAME} ${PLATFORM_SOURCES})
target_link_libraries(${EXECUTABLE_NAME} core unix)

View File

@@ -0,0 +1,7 @@
if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
return()
endif()
set(UNIX_SOURCES attr.c deleted.c dirdepth.c filename.c files.c frag.c links.c os.c perms.c rsrcfork.c sparse.c time.c volume.c xattr.c)
add_library(unix ${UNIX_SOURCES})