2023-04-02 04:07:27 +03:00
|
|
|
cmake_minimum_required(VERSION 3.26)
|
|
|
|
|
|
|
|
project(BAN CXX)
|
|
|
|
|
2023-05-22 20:19:21 +03:00
|
|
|
set(BAN_SOURCES
|
2024-03-04 11:41:54 +02:00
|
|
|
BAN/Assert.cpp
|
2023-05-22 20:19:21 +03:00
|
|
|
BAN/New.cpp
|
|
|
|
BAN/String.cpp
|
|
|
|
BAN/StringView.cpp
|
|
|
|
BAN/Time.cpp
|
|
|
|
)
|
|
|
|
|
2023-04-06 00:23:02 +03:00
|
|
|
add_custom_target(ban-headers
|
2023-11-04 17:50:43 +02:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_CURRENT_SOURCE_DIR}/include/ ${BANAN_INCLUDE}/
|
2023-04-02 04:07:27 +03:00
|
|
|
DEPENDS sysroot
|
|
|
|
)
|
2023-04-06 00:23:02 +03:00
|
|
|
|
2023-05-22 20:19:21 +03:00
|
|
|
add_library(ban ${BAN_SOURCES})
|
|
|
|
add_dependencies(ban headers libc-install)
|
|
|
|
|
2023-04-06 00:23:02 +03:00
|
|
|
add_custom_target(ban-install
|
2023-11-04 17:50:43 +02:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/libban.a ${BANAN_LIB}/
|
2023-05-22 20:19:21 +03:00
|
|
|
DEPENDS ban
|
2023-05-31 22:40:15 +03:00
|
|
|
BYPRODUCTS ${BANAN_LIB}/libban.a
|
2023-04-06 00:23:02 +03:00
|
|
|
)
|