﻿# (c) 2023, Christoph Peters
# This work is licensed under a CC0 1.0 Universal License. To the extent
# possible under law, Christoph Peters has waived all copyright and related or
# neighboring rights to the following code. This work is published from
# Germany. https://creativecommons.org/publicdomain/zero/1.0/

cmake_minimum_required (VERSION 3.11)

# Define an executable target
project(aabb_computation)
add_executable(aabb_computation)

# Specify the required C standard
set_target_properties(aabb_computation PROPERTIES C_STANDARD 99)
set_target_properties(aabb_computation PROPERTIES CMAKE_C_STANDARD_REQUIRED True)

# Add source code
target_sources(aabb_computation PRIVATE aabb_computation.c aabb_computation.h config.h main.c sh.h)

# math.h is being used
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
	target_link_libraries(aabb_computation PUBLIC ${MATH_LIBRARY})
endif()
