24 lines
630 B
CMake
24 lines
630 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(ninja LANGUAGES C)
|
|
|
|
set(CMAKE_C_STANDARD 99)
|
|
|
|
add_compile_options(-g -Wall -pedantic)
|
|
|
|
add_executable(njvm njvm.c)
|
|
|
|
# Include directories for njvm executable
|
|
target_include_directories(njvm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bigint/build/include)
|
|
|
|
# Add the library
|
|
add_library(bigint STATIC ${CMAKE_SOURCE_DIR}/bigint/src/bigint.c
|
|
support.c
|
|
GC.c)
|
|
|
|
# Include directories for the bigint library
|
|
target_include_directories(bigint PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/bigint/build/include)
|
|
|
|
# Link the executable with the library
|
|
target_link_libraries(njvm PRIVATE bigint)
|
|
|