star-enclosures-3d

Extract enclosures from 3D geometry
git clone git://git.meso-star.fr/star-enclosures-3d.git
Log | Files | Refs | README | LICENSE

commit 0f2d71348d8ef517a417a211e1f71c790af63224
parent 610315423dea0e60edc1727c46599b4641742228
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 14 Dec 2023 15:27:32 +0100

Remove CMake support

POSIX make is now the only supported build system

Diffstat:
Dcmake/CMakeLists.txt | 206-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 206 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,206 +0,0 @@ -# Copyright (C) 2018-2020, 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-enclosures-3d C) -enable_testing() - -include(CMakeDependentOption) - -set(SENC3D_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Do not build tests" OFF) - -cmake_dependent_option(HUGE_ADDITIONAL_TESTS - "Build additional tests that involve millions of triangles" OFF - "NOT NO_TEST" OFF) - -############################################################################### -# Check dependencies -############################################################################### -find_package(RCMake 0.4 REQUIRED) -find_package(Star3D 0.8 REQUIRED) -find_package(RSys 0.8.1 REQUIRED) -find_package(OpenMP 2.0 REQUIRED) - -if(NOT NO_TEST) - find_package(StarSP 0.12 QUIET) - find_package(Star3DUT 0.3.1 QUIET) -endif() - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories( - ${RSys_INCLUDE_DIR} - ${Star3D_INCLUDE_DIR}) - -rcmake_append_runtime_dirs(_runtime_dirs RSys Star3D) - -if(StarSP_FOUND) - include_directories(${StarSP_INCLUDE_DIR}) - rcmake_append_runtime_dirs(_runtime_dirs StarSP) -endif() - -if(Star3DUT_FOUND) - include_directories(${Star3DUT_INCLUDE_DIR}) - rcmake_append_runtime_dirs(_runtime_dirs Star3DUT) -endif() - -############################################################################### -# Configure and define targets -############################################################################### -set(VERSION_MAJOR 0) -set(VERSION_MINOR 5) -set(VERSION_PATCH 5) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SENC3D_FILES_SRC - senc3d_descriptor.c - senc3d_device.c - senc3d_enclosure.c - senc3d_scene.c - senc3d_scene_analyze.c) - -set(SENC3D_FILES_INC_API - senc3d.h - senc3d_sXd_helper.h - sencX3d.h - sencX3d_undefs.h) - -set(SENC3D_FILES_INC - senc3d_device_c.h - senc3d_enclosure_c.h - senc3d_enclosure_data.h - senc3d_internal_types.h - senc3d_scene_c.h - senc3d_scene_analyze_c.h - senc3d_side_range.h) - -set(SENC3D_FILES_DOC COPYING README.md) - -# Prepend each file by `SENC3D_SOURCE_DIR' -rcmake_prepend_path(SENC3D_FILES_SRC ${SENC3D_SOURCE_DIR}) -rcmake_prepend_path(SENC3D_FILES_INC ${SENC3D_SOURCE_DIR}) -rcmake_prepend_path(SENC3D_FILES_INC_API ${SENC3D_SOURCE_DIR}) -rcmake_prepend_path(SENC3D_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -if(CMAKE_COMPILER_IS_GNUCC) - set(MATH_LIB m) -endif() - -add_library(senc3d SHARED - ${SENC3D_FILES_SRC} - ${SENC3D_FILES_INC} - ${SENC3D_FILES_INC_API}) -target_link_libraries(senc3d RSys Star3D ${MATH_LIB}) - -set_target_properties(senc3d PROPERTIES -# C99 needed in case of printf %zu used -# C_STANDARD 99 - DEFINE_SYMBOL SENC3D_SHARED_BUILD - VERSION ${VERSION} - COMPILE_FLAGS ${OpenMP_C_FLAGS} - SOVERSION ${VERSION_MAJOR}) -rcmake_copy_runtime_libraries(senc3d) - -if(CMAKE_COMPILER_IS_GNUCC) - set_target_properties(senc3d PROPERTIES LINK_FLAGS "${OpenMP_C_FLAGS}") - target_link_libraries(senc3d m) -endif() - -rcmake_setup_devel(senc3d StarEnc3D ${VERSION} star/senc3d_version.h) - -############################################################################### -# Add tests -############################################################################### -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} - ${SENC3D_SOURCE_DIR}/test_senc3d_utils.h - ${SENC3D_SOURCE_DIR}/${_name}.c) - foreach(other ${ARGN}) - target_sources(${_name} - PUBLIC ${SENC3D_SOURCE_DIR}/${other}) - endforeach() - target_link_libraries(${_name} RSys senc3d) - endfunction() - - function(register_test _name) - add_test(${_name} ${ARGN}) - rcmake_set_test_runtime_dirs(${_name} _runtime_dirs) - endfunction() - - function(new_test _name) - build_test(${_name} ${ARGN}) - register_test(${_name} ${_name}) - endfunction() - - new_test(test_senc3d_bad_grouping) - new_test(test_senc3d_cube_behind_cube) - new_test(test_senc3d_cube_in_cube) - new_test(test_senc3d_cube_on_cube) - new_test(test_senc3d_device) - new_test(test_senc3d_enclosure) - new_test(test_senc3d_inconsistant_cube) - new_test(test_senc3d_invalid_scenes) - new_test(test_senc3d_multi_media) - new_test(test_senc3d_scene) - new_test(test_senc3d_some_enclosures) - new_test(test_senc3d_some_triangles) - new_test(test_senc3d_unspecified_medium) - new_test(test_senc3d_zero_distance) - - target_link_libraries(test_senc3d_enclosure Star3D) - rcmake_copy_runtime_libraries(test_senc3d_enclosure) - - if(NOT StarSP_FOUND) - message(STATUS - "StarSP is not found. Do not compile the " - "'test_senc3d_sample_enclosure' test") - else() - new_test(test_senc3d_sample_enclosure) - target_link_libraries(test_senc3d_sample_enclosure StarSP Star3D) - rcmake_copy_runtime_libraries(test_senc3d_sample_enclosure) - endif() - - if(NOT Star3DUT_FOUND) - message(STATUS - "Star3DUT is not found. Do not compile the " - "'test_senc3d_many_<enclosures|triangles>' tests") - else() - build_test(test_senc3d_many_enclosures test_senc3d_utils2.h) - build_test(test_senc3d_many_triangles test_senc3d_utils2.h) - target_link_libraries(test_senc3d_many_enclosures Star3DUT) - target_link_libraries(test_senc3d_many_triangles Star3DUT) - rcmake_copy_runtime_libraries(test_senc3d_many_enclosures) - rcmake_copy_runtime_libraries(test_senc3d_many_triangles) - - if(HUGE_ADDITIONAL_TESTS) - add_test(test_senc3d_many_enclosures test_senc3d_many_enclosures) - add_test(test_senc3d_many_triangles test_senc3d_many_triangles) - endif() - endif() -endif() - -############################################################################### -# Define output & install directories -############################################################################### -install(TARGETS senc3d - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${SENC3D_FILES_INC_API} DESTINATION include/star) -install(FILES ${SENC3D_FILES_DOC} DESTINATION share/doc/star-enclosures-3d)