summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3ddb60e
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.17)
+
+set(ZP_ENABLE_SYSTEM_CALLS False CACHE BOOL "Disable the syscl function (False|True).")
+set(ZP_LIBRARY_TYPE "Static" CACHE STRING "Type of library file (Static|Shared).")
+set(ZP_TARGET "Any" CACHE STRING "Target of the library (Any or Amd64|Arm|Arm64|Ia32).")
+
+if("${ZP_LIBRARY_TYPE}" STREQUAL "Static")
+ set(ZP_LIBRARY_TYPE_VALUE STATIC)
+elseif("${ZP_LIBRARY_TYPE}" STREQUAL "Shared")
+set(ZP_LIBRARY_TYPE_VALUE SHARED)
+else()
+ message(FATAL_ERROR "Library type \"${ZP_LIBRARY_TYPE}\" is invalid")
+endif()
+
+message(STATUS "Building ${ZP_LIBRARY_TYPE} library")
+message(STATUS "Targeting ${ZP_TARGET}")
+
+project(
+ zp
+
+ VERSION 0.0.2
+ HOMEPAGE_URL "https://mandelbrot.dk/zp"
+ LANGUAGES C CXX ASM
+)
+
+add_subdirectory(zp)