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-04-10 20:27:20 +03: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-05-22 20:19:21 +03:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libban.a ${BANAN_LIB}/
|
|
|
|
DEPENDS ban
|
2023-04-06 00:23:02 +03:00
|
|
|
)
|