-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (32 loc) · 1.08 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
# Copyright (C) 2023 Toitware ApS.
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file.
cmake_minimum_required(VERSION 3.23)
project(partition-table)
set(TOITPKG
"toit.pkg${CMAKE_EXECUTABLE_SUFFIX}"
CACHE
FILEPATH
"The executable used to install packages")
set(TOITC
"toit.compile${CMAKE_EXECUTABLE_SUFFIX}"
CACHE
FILEPATH
"The executable used to compile programs and check the syntax")
set(DEFAULT_SDK_VERSION CACHE STRING "The default SDK version to use")
set(PARTITION_TABLE_GIT_VERSION "$ENV{PARTITION_TABLE_GIT_VERSION}")
if ("${PARTITION_TABLE_GIT_VERSION}" STREQUAL "")
include(tools/gitversion.cmake)
# The Git version is only computed when cmake generates the Ninja files, but
# that should be good enough.
compute_git_version(PARTITION_TABLE_GIT_VERSION)
endif()
# Replace the version in app/version.toit.
configure_file(
bin/version.toit.in
${CMAKE_CURRENT_SOURCE_DIR}/bin/version.toit
@ONLY)
include("tools/toit.cmake")
add_custom_target(build)
enable_testing()
add_subdirectory(bin)