commit 512f65f4093f601540a9d4571aa872370393b109 parent bc0fe8bf30de0ebd1f57161dfe62b1e710e6683a Author: Vincent Forest <vincent.forest@meso-star.com> Date: Wed, 18 Oct 2023 17:16:31 +0200 Remove CMake support POSIX make is now the only supported build system Diffstat:
| D | cmake/CMakeLists.txt | | | 156 | ------------------------------------------------------------------------------- |
1 file changed, 0 insertions(+), 156 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,156 +0,0 @@ -# Copyright (C) 2015-2023 |Méso|Star> (contact@meso-star.com) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cmake_minimum_required(VERSION 3.1) -project(star-3d C) -enable_testing() - -set(S3D_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Disable the test" OFF) - -################################################################################ -# Check dependencies -################################################################################ -find_package(Embree 4.0 REQUIRED) -find_package(RCMake 0.2.2 REQUIRED) -find_package(RSys 0.6 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories(${EMBREE_INCLUDE_DIRS} ${RSys_INCLUDE_DIR}) - -if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") -endif() - -################################################################################ -# Configure and define targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 8) -set(VERSION_PATCH 1) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(S3D_FILES_SRC - s3d_device.c - s3d_geometry.c - s3d_instance.c - s3d_mesh.c - s3d_primitive.c - s3d_scene.c - s3d_scene_view.c - s3d_scene_view_closest_point.c - s3d_scene_view_trace_ray.c - s3d_shape.c - s3d_sphere.c) -set(S3D_FILES_INC_API s3d.h) -set(S3D_FILES_INC - s3d.h - s3d_backend.h - s3d_buffer.h - s3d_device_c.h - s3d_geometry.h - s3d_instance.h - s3d_mesh.h - s3d_scene_c.h - s3d_scene_view_c.h - s3d_shape_c.h - s3d_sphere.h) -set(S3D_FILES_DOC COPYING.fr COPYING.en README.md) - -# Prepend each file in the `S3D_FILES_<SRC|INC>' list by `S3D_SOURCE_DIR' -rcmake_prepend_path(S3D_FILES_SRC ${S3D_SOURCE_DIR}) -rcmake_prepend_path(S3D_FILES_INC ${S3D_SOURCE_DIR}) -rcmake_prepend_path(S3D_FILES_INC_API ${S3D_SOURCE_DIR}) -rcmake_prepend_path(S3D_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -add_library(s3d SHARED ${S3D_FILES_SRC} ${S3D_FILES_INC} ${S3D_FILES_INC_API}) -target_link_libraries(s3d RSys ${EMBREE_LIBRARIES}) - -if(CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(s3d m) -endif() - -set_target_properties(s3d PROPERTIES - DEFINE_SYMBOL S3D_SHARED_BUILD - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -rcmake_setup_devel(s3d Star3D ${VERSION} star/s3d_version.h) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} - ${S3D_SOURCE_DIR}/${_name}.c - ${S3D_SOURCE_DIR}/test_s3d_utils.h) - target_link_libraries(${_name} s3d RSys) - set(_libraries ${ARGN}) - foreach(_lib ${_libraries}) - target_link_libraries(${_name} ${_lib}) - endforeach() - endfunction() - - function(register_test _name) - add_test(${_name} ${ARGN}) - endfunction() - - function(new_test _name) - build_test(${_name} ${ARGN}) - register_test(${_name} ${_name}) - endfunction() - - new_test(test_s3d_accel_struct_conf) - new_test(test_s3d_closest_point) - new_test(test_s3d_device) - new_test(test_s3d_sampler) - new_test(test_s3d_sample_sphere) - new_test(test_s3d_scene) - new_test(test_s3d_scene_view) - new_test(test_s3d_scene_view_aabb) - new_test(test_s3d_seams) - new_test(test_s3d_shape) - new_test(test_s3d_sphere) - new_test(test_s3d_sphere_box) - new_test(test_s3d_primitive) - new_test(test_s3d_trace_ray_instance) - new_test(test_s3d_trace_ray_sphere) - - build_test(test_s3d_sphere_instance) - register_test(test_s3d_sphere_instance_legacy test_s3d_sphere_instance) - register_test(test_s3d_sphere_instance_filter test_s3d_sphere_instance filter) - - build_test(test_s3d_trace_ray) - register_test(test_s3d_trace_ray_legacy test_s3d_trace_ray) - register_test(test_s3d_trace_ray_filter test_s3d_trace_ray filter) - - rcmake_copy_runtime_libraries(test_s3d_trace_ray) - -endif(NOT NO_TEST) - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS s3d - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${S3D_FILES_INC_API} DESTINATION include/star) -install(FILES ${S3D_FILES_DOC} DESTINATION share/doc/star-3d) -