-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
33 lines (24 loc) · 923 Bytes
/
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
# This file is part of Dartagnan.
#
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.10)
project(Animal LANGUAGES CXX)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(SOURCES
animal.cpp
# For the sake of simplicity, we also add the generated binding glue here
# Otherwise you'd need to build ./generated/AnimalBindings/CMakeLists.txt and get
# a 2nd C++ library.
generated/AnimalBindings/dart/ffi/Animal_c.cpp
)
# The Animal lib is the client C++ library, which we'll generate bindings for
add_library(Animal SHARED ${SOURCES})
include(GenerateExportHeader)
generate_export_header(Animal)
set_property(TARGET Animal PROPERTY CXX_STANDARD 14)
target_include_directories(Animal
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
)