2019-03-28 04:03:35 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2019-03-28 00:02:36 +00:00
|
|
|
project(spice LANGUAGES C)
|
|
|
|
|
|
|
|
find_package(PkgConfig)
|
|
|
|
pkg_check_modules(SPICE_PKGCONFIG REQUIRED
|
|
|
|
spice-protocol
|
|
|
|
nettle
|
|
|
|
hogweed
|
|
|
|
)
|
|
|
|
|
|
|
|
add_definitions(-D USE_NETTLE)
|
|
|
|
|
|
|
|
add_library(spice STATIC
|
|
|
|
src/spice.c
|
|
|
|
src/rsa.c
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(spice
|
2019-04-11 01:12:59 +00:00
|
|
|
lg_common
|
2019-03-28 00:02:36 +00:00
|
|
|
${SPICE_PKGCONFIG_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(spice
|
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
PRIVATE
|
|
|
|
src
|
|
|
|
${SPICE_PKGCONFIG_INCLUDE_DIRS}
|
|
|
|
)
|