fef
7eed96edcf
completely replacing libc while still supporting all POSIX compliant systems is probably gonna take a little more effort than just one developer. Which is a bummer, but you gotta work with the cards you're dealt, i guess.
45 lines
1.3 KiB
CMake
45 lines
1.3 KiB
CMake
# See the end of this file for copyright and license terms.
|
|
|
|
cmake_minimum_required(VERSION 3.0.0)
|
|
project(neo VERSION 0.1.0 LANGUAGES C ASM)
|
|
set(CMAKE_C_STANDARD 11)
|
|
|
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
option(DEBUG "Enable debug features" ON)
|
|
include(CTest)
|
|
enable_testing()
|
|
endif()
|
|
|
|
find_package(Git QUIET)
|
|
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
|
execute_process(
|
|
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
OUTPUT_VARIABLE neo_GIT_REVISION
|
|
ERROR_QUIET
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
if (NOT "${neo_GIT_REVISION}" STREQUAL "")
|
|
set(neo_VERSION_SUFFIX "-${neo_GIT_REVISION}")
|
|
endif()
|
|
endif()
|
|
|
|
add_subdirectory(src)
|
|
|
|
add_subdirectory(demo)
|
|
|
|
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
|
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
|
include(CPack)
|
|
|
|
# This file is part of libneo.
|
|
# Copyright (c) 2021 Fefie <owo@fef.moe>.
|
|
#
|
|
# libneo is non-violent software: you may only use, redistribute,
|
|
# and/or modify it under the terms of the CNPLv6+ as found in
|
|
# the LICENSE file in the source code root directory or at
|
|
# <https://git.pixie.town/thufie/CNPL>.
|
|
#
|
|
# libneo comes with ABSOLUTELY NO WARRANTY, to the extent
|
|
# permitted by applicable law. See the CNPLv6+ for details.
|