libflint/CMakeLists.txt

28 lines
642 B
CMake
Raw Normal View History

2021-02-01 22:06:37 +00:00
cmake_minimum_required(VERSION 3.17)
project(flint C)
2021-12-10 20:41:36 +00:00
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2021-02-01 22:06:37 +00:00
set(CMAKE_C_STANDARD 99)
include_directories(include)
set(SOURCES
src/lflinkedlist.c
src/lfset.c
src/lfstack.c
src/lfbinarytree.c
src/lfinput.c
src/lfmath.c
2021-02-01 22:06:37 +00:00
)
add_library(flint ${SOURCES})
2022-03-30 23:36:00 +00:00
if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") AND NOT (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"))
target_link_libraries(flint bsd)
endif()
2021-02-01 22:06:37 +00:00
if(${CMAKE_PROJECT_NAME} STREQUAL flint)
add_executable(tests tests/tests.c)
target_include_directories(tests PRIVATE include)
2022-03-30 23:36:00 +00:00
target_link_libraries(tests flint bsd)
2021-02-01 22:06:37 +00:00
endif()