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
|
|
|
|
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-08-23 10:35:16 +03:00
|
|
|
COMMAND sudo rsync -r ${CMAKE_CURRENT_SOURCE_DIR}/include/ ${BANAN_INCLUDE}/
|
2023-04-02 04:07:27 +03:00
|
|
|
DEPENDS sysroot
|
2023-08-23 10:35:16 +03:00
|
|
|
USES_TERMINAL
|
2023-04-02 04:07:27 +03:00
|
|
|
)
|
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-08-23 10:35:16 +03:00
|
|
|
COMMAND sudo cp ${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-08-23 10:35:16 +03:00
|
|
|
USES_TERMINAL
|
2023-04-06 00:23:02 +03:00
|
|
|
)
|