-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (50 loc) · 1.43 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright (c) Alpaca Core
# SPDX-License-Identifier: MIT
#
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
project(ilib-foo
VERSION 1.0.0
DESCRIPTION "Example plugin for the Alpaca Core Local SDK"
LANGUAGES CXX
)
include(./get-ac-build.cmake)
#################
# cmake lib
CPMAddPackage(gh:iboB/[email protected])
list(APPEND CMAKE_MODULE_PATH
"${icm_SOURCE_DIR}"
)
include(icm_add_lib)
include(init_ac_prj)
include(ac_build_prj_util)
include(ac_build_plugin_util)
#################
# options
option(AC_FOO_BUILD_TESTS "${PROJECT_NAME}: build tests" ${testsDefault})
option(AC_FOO_BUILD_EXAMPLES "${PROJECT_NAME}: build examples" ${examplesDefault})
mark_as_advanced(AC_FOO_BUILD_TESTS AC_FOO_BUILD_EXAMPLES)
init_ac_plugin_option(FOO)
#######################################
# packages
add_ac_local(0.1.4)
CPMAddPackage(gh:iboB/[email protected])
CPMAddPackage(gh:iboB/[email protected])
#######################################
# subdirs
add_subdirectory(code)
if(AC_FOO_BUILD_TESTS OR AC_FOO_BUILD_EXAMPLES)
CPMAddPackage(gh:alpaca-core/[email protected])
endif()
if(AC_FOO_BUILD_TESTS)
CPMAddPackage(gh:iboB/[email protected])
set_target_properties(doctest PROPERTIES FOLDER test)
set_target_properties(doctest-main PROPERTIES FOLDER test)
enable_testing()
add_subdirectory(test)
endif()
if(AC_FOO_BUILD_EXAMPLES)
add_subdirectory(example)
endif()
if(BUILD_AC_FOO_PLUGIN)
add_subdirectory(ac-local-plugin)
endif()