summaryrefslogtreecommitdiff
path: root/Help/guide/importing-exporting/DownstreamComponents/CMakeLists.txt
blob: 88b46c81c66a591204d6037e79ad8d0fcf20e5a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cmake_minimum_required(VERSION 3.15)
project(DownstreamComponents)

# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# find MathFunctions
find_package(MathFunctions 3.4 COMPONENTS Addition SquareRoot)

# create executable
add_executable(myexe main.cc)

# use MathFunctions library
target_link_libraries(myexe PRIVATE MathFunctions::Addition MathFunctions::SquareRoot)

# Workaround for GCC on AIX to avoid -isystem, not needed in general.
set_property(TARGET myexe PROPERTY NO_SYSTEM_FROM_IMPORTED 1)