star-2d

Contour structuring for efficient 2D geometric queries
git clone git://git.meso-star.fr/star-2d.git
Log | Files | Refs | README | LICENSE

commit 78b8aff646f5b57829ef631bffa2eb2eae29d549
parent 0d97aea6cd775d5bd2bdcd83926d85543c57c271
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 20 Oct 2023 16:38:31 +0200

Remove CMake support

POSIX make is now the only supported build system.

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

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,148 +0,0 @@ -# Copyright (C) 2016-2021, 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-2d C) -enable_testing() - -set(S2D_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Disable the test" OFF) - -################################################################################ -# Check dependencies -################################################################################ -find_package(Embree 4 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}) - -rcmake_append_runtime_dirs(_runtime_dirs RSys Embree) - -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 6) -set(VERSION_PATCH 0) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(S2D_FILES_SRC - s2d_device.c - s2d_geometry.c - s2d_line_segments.c - s2d_primitive.c - s2d_scene.c - s2d_scene_view.c - s2d_scene_view_closest_point.c - s2d_shape.c) -set(S2D_FILES_INC_API s2d.h) -set(S2D_FILES_INC - s2d_backend.h - s2d_buffer.h - s2d_device_c.h - s2d_geometry.h - s2d_line_segments.h - s2d_scene_c.h - s2d_scene_view_c.h - s2d_shape_c.h) -set(S2D_FILES_DOC COPYING.fr COPYING.en README.md) - -# Prepend each file in the `S2D_FILES_<SRC|INC>' list by `S2D_SOURCE_DIR' -rcmake_prepend_path(S2D_FILES_SRC ${S2D_SOURCE_DIR}) -rcmake_prepend_path(S2D_FILES_INC ${S2D_SOURCE_DIR}) -rcmake_prepend_path(S2D_FILES_INC_API ${S2D_SOURCE_DIR}) -rcmake_prepend_path(S2D_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -add_library(s2d SHARED ${S2D_FILES_SRC} ${S2D_FILES_INC} ${S2D_FILES_INC_API}) -target_link_libraries(s2d RSys ${EMBREE_LIBRARIES}) - -if(CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(s2d m) -endif() - -if(MSVC) - ### disable verbose warnings: - # warning C4127: conditional expression is constant - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127") - # warning C4312: 'operation' : conversion from 'type1' to 'type2' of greater size - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4312") -endif() - -set_target_properties(s2d PROPERTIES - DEFINE_SYMBOL S2D_SHARED_BUILD - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -rcmake_setup_devel(s2d Star2D ${VERSION} star/s2d_version.h) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} - ${S2D_SOURCE_DIR}/${_name}.c - ${S2D_SOURCE_DIR}/test_s2d_utils.h) - target_link_libraries(${_name} s2d RSys) - set(_libraries ${ARGN}) - foreach(_lib ${_libraries}) - target_link_libraries(${_name} ${_lib}) - endforeach() - 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_s2d_closest_point) - new_test(test_s2d_device) - new_test(test_s2d_primitive) - new_test(test_s2d_raytrace) - new_test(test_s2d_sample) - new_test(test_s2d_shape) - new_test(test_s2d_scene) - new_test(test_s2d_scene_view) - new_test(test_s2d_scene_view2) - new_test(test_s2d_trace_ray) - new_test(test_s2d_trace_ray_3d) - - rcmake_copy_runtime_libraries(test_s2d_device) -endif(NOT NO_TEST) - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS s2d - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${S2D_FILES_INC_API} DESTINATION include/star) -install(FILES ${S2D_FILES_DOC} DESTINATION share/doc/star-2d) -