2023-11-19 20:21:56 -05:00
|
|
|
# Copyright 2023 The LightningBolt Authors
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-11-19 06:19:15 -05:00
|
|
|
cmake_minimum_required(VERSION 3.15)
|
|
|
|
|
|
|
|
project(lightningbolt
|
|
|
|
LANGUAGES CXX
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
|
|
|
|
|
|
|
include(Policies)
|
|
|
|
include(ProjectFuncs)
|
|
|
|
|
|
|
|
# default linker
|
|
|
|
if(NOT LIGHTNINGBOLT_LINKER AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
|
|
set(LIGHTNINGBOLT_LINKER "lld")
|
|
|
|
elseif(NOT LIGHTNINGBOLT_LINKER)
|
|
|
|
set(LIGHTNINGBOLT_LINKER "bfd")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
lb_set_alternate_linker()
|
|
|
|
|
|
|
|
add_subdirectory(lib/base)
|
2023-11-19 21:28:06 -05:00
|
|
|
add_subdirectory(lib/bolt)
|
2023-11-19 06:19:15 -05:00
|
|
|
|
|
|
|
add_executable(lightningbolt
|
|
|
|
src/main.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(lightningbolt PRIVATE
|
|
|
|
lb::base
|
2023-11-19 21:28:06 -05:00
|
|
|
lb::bolt
|
2023-11-19 06:19:15 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
lb_target(lightningbolt)
|