2024-05-25 11:50:21 +00:00
|
|
|
cmake_minimum_required(VERSION 3.15...3.25)
|
|
|
|
|
|
|
|
project(gemstone_stdlib
|
|
|
|
VERSION 0.1.0
|
|
|
|
DESCRIPTION "gemstone programming language standard library"
|
|
|
|
LANGUAGES C)
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 23)
|
|
|
|
set(CMAKE_C_STANDARD_REQUIRED TRUE)
|
|
|
|
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
2024-06-03 14:23:12 +00:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src)
|
2024-05-25 11:50:21 +00:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/../bin/std")
|
|
|
|
|
|
|
|
# add native module libraries
|
|
|
|
|
2024-06-03 14:23:12 +00:00
|
|
|
file(GLOB_RECURSE STDLIB_IO_SOURCE_FILES src/io/*.c)
|
2024-07-18 17:55:17 +00:00
|
|
|
add_library(gscio ${STDLIB_IO_SOURCE_FILES})
|
2024-05-25 11:50:21 +00:00
|
|
|
|
2024-06-03 14:23:12 +00:00
|
|
|
file(GLOB_RECURSE STDLIB_MEM_SOURCE_FILES src/mem/*.c)
|
2024-07-18 17:55:17 +00:00
|
|
|
add_library(gscmem ${STDLIB_MEM_SOURCE_FILES})
|
2024-06-03 16:35:23 +00:00
|
|
|
|
|
|
|
file(GLOB_RECURSE STDLIB_OS_SOURCE_FILES src/os/*.c)
|
2024-07-18 17:55:17 +00:00
|
|
|
add_library(gscos ${STDLIB_OS_SOURCE_FILES})
|
|
|
|
|
|
|
|
# Complete standard library
|
|
|
|
add_library(gscstd
|
|
|
|
${STDLIB_IO_SOURCE_FILES}
|
|
|
|
${STDLIB_MEM_SOURCE_FILES}
|
|
|
|
${STDLIB_OS_SOURCE_FILES})
|