aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: d2d1d898511e012d65c41e793fe1a0a17e75a3c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.11)
project(spm C)

include(FindPkgConfig)
include(CTest)
include(CheckSymbolExists)

set(CMAKE_C_STANDARD 99)
set(CMAKE_INSTALL_RPATH $ORIGIN/../lib)

enable_testing()
check_symbol_exists(strsep string.h HAVE_STRSEP)
check_symbol_exists(reallocarray stdlib.h HAVE_REALLOCARRAY)
pkg_check_modules(OpenSSL openssl>=1.1)
pkg_check_modules(CURL libcurl>=7.0)
find_program(RELOC reloc)
find_program(TAR tar)
find_program(WHICH which)
find_program(FILE file)
find_program(OBJDUMP objdump)
find_program(RSYNC rsync)

configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/include/config.h)

add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(include)
add_subdirectory(scripts)
add_subdirectory(tests)