-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·52 lines (41 loc) · 2.18 KB
/
CMakeLists.txt
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.9)
project(vamos-experiments)
set(CMAKE_VERBOSE_MAKEFILE 1)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
find_package(vamos-buffers REQUIRED)
# make sure the path is aboslute (could be provided by the user)
get_filename_component(vamos-buffers_DIR ${vamos-buffers_DIR} ABSOLUTE)
include_directories(${vamos-buffers_INCLUDE_DIRS})
get_target_property(vamos-buffers_vamos-buffers-lib vamos-buffers-lib LOCATION)
get_target_property(vamos-buffers_vamos-buffers-ringbuf vamos-buffers-ringbuf LOCATION)
get_target_property(vamos-buffers_vamos-buffers-shmbuf vamos-buffers-shmbuf LOCATION)
get_target_property(vamos-buffers_vamos-buffers-streams vamos-buffers-streams LOCATION)
get_filename_component(vamos-buffers_LIBRARIES_DIRS_lib ${vamos-buffers_vamos-buffers-lib} DIRECTORY)
get_filename_component(vamos-buffers_LIBRARIES_DIRS_core ${vamos-buffers_vamos-buffers-ringbuf} DIRECTORY)
get_filename_component(vamos-buffers_LIBRARIES_DIRS_shmbuf ${vamos-buffers_vamos-buffers-shmbuf} DIRECTORY)
get_filename_component(vamos-buffers_LIBRARIES_DIRS_streams ${vamos-buffers_vamos-buffers-streams} DIRECTORY)
if (vamos_compiler_DIR)
# make sure the user-provided path is aboslute
get_filename_component(vamos_compiler_DIR ${vamos_compiler_DIR} ABSOLUTE)
message(STATUS "vamos_compiler_DIR=${vamos_compiler_DIR}")
else()
message(FATAL_ERROR "Need to set vamos_compiler_DIR variable")
endif()
if (vamos_sources_DIR)
# make sure the user-provided path is aboslute
get_filename_component(vamos_sources_DIR ${vamos_sources_DIR} ABSOLUTE)
message(STATUS "vamos_sources_DIR=${vamos_sources_DIR}")
else()
message(FATAL_ERROR "Need to set vamos_sources_DIR variable")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Makefile.config.in
${CMAKE_CURRENT_SOURCE_DIR}/Makefile.config)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup-vars.sh.in
${CMAKE_CURRENT_SOURCE_DIR}/setup-vars.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.py.in
${CMAKE_CURRENT_SOURCE_DIR}/config.py)
add_custom_target(gen-readme
COMMAND pandoc -f markdown -t HTML -o README.html README.md
COMMAND pandoc -f markdown -t pdf -o README.pdf README.md)