Project

General

Profile

Support Request #10085 » CMakeLists.txt

hidden, 2020-01-29 10:15

 
1
cmake_minimum_required (VERSION 3.10)
2

    
3
#name for visual studio solution
4
project (HelloVersion)
5

    
6
# set name of filter in ADTF
7
set (HELLO_VERSION_FILTER hello_version_filter)
8

    
9
#create header and source if they do not exist yet
10
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/hello_version_filter.h)
11
  file(WRITE hello_version_filter.h)
12
endif()
13
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/hello_version_filter.cpp)
14
  file(WRITE hello_version_filter.cpp)
15
endif()
16

    
17
# makes headers, libraries and additional CMake macros of the ADTF SDK available
18
find_package(ADTF COMPONENTS filtersdk)
19

    
20
# Adds the hello_version_filter project to the Visual Studio solution, which when build
21
# creates a shared object called hello_version_filter.adtfplugin
22
adtf_add_filter(${HELLO_VERSION_FILTER} hello_version_filter.h hello_version_filter.cpp)
23

    
24
# Adds the INSTALL project to the Visual Studio solution, which when build
25
# copies our filter to the subdirectory given as the second argument into ${CMAKE_INSTALL_PREFIX}
26
adtf_install_filter(${HELLO_VERSION_FILTER} src/examples/bin)
27

    
28
# Generate a plugindescription for our filter
29
adtf_create_plugindescription(TARGET ${HELLO_VERSION_FILTER} PLUGIN_SUBDIR "src/examples/bin")
(1-1/3)