summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: db9119728e6dc530547a265db3e2c58e65a5a49b (plain)
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.2)

include( FindPkgConfig )
include( FindDoxygen )

add_custom_target(check COMMAND ${CMAKE_SOURCE_DIR}/run-check ${CMAKE_BINARY_DIR}/ept/test-ept)

set( EPT_VERSION "1.0.14" )

# Get the soversion from libapt-pkg to include in our own
execute_process(
	COMMAND "cc" "-xc" "-shared" "-Wl,--no-as-needed" "/dev/null" "-lapt-pkg"
	)
execute_process(
	COMMAND "objdump" "-p" "a.out"
	COMMAND "awk" "/NEEDED.*libapt-pkg/ { sub(\".*\\\\.so\\\\.\", \"\"); print }"
	OUTPUT_VARIABLE LIBAPT_ABI_VERSION
	OUTPUT_STRIP_TRAILING_WHITESPACE
	)
set( LIBEPT_SOVERSION "1.aptpkg${LIBAPT_ABI_VERSION}" )
set( APT_INCLUDES "/usr/include/" CACHE STRING "apt include path" )
set( APT_LINKDIRS "/usr/lib/" CACHE STRING "apt library path" )
set( OPT_FLAGS "-O0 -g" CACHE STRING "optimization level" )

pkg_check_modules( WIBBLE REQUIRED "libwibble >= 1.0" )

add_subdirectory( ept )
add_subdirectory( tools )
add_subdirectory( doc )