chore(build): add cmake config

This commit is contained in:
fallenoak 2020-12-02 18:35:19 -06:00
parent d610030a1d
commit f886ab5bc3
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
2 changed files with 27 additions and 0 deletions

21
CMakeLists.txt Normal file
View file

@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.1)
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR
"In-source builds not allowed.
Please make a new directory (called a build directory) and run CMake from there.
You may need to remove CMakeCache.txt."
)
endif()
if(TARGET system)
# Guard for use as transitive dependency
return()
endif()
# Project
project(system)
set(CMAKE_CXX_STANDARD 11)
add_subdirectory(system)

6
system/CMakeLists.txt Normal file
View file

@ -0,0 +1,6 @@
add_library(system INTERFACE)
target_include_directories(system
INTERFACE
${PROJECT_SOURCE_DIR}
)