star-sf

Set of surface and volume scattering functions
git clone git://git.meso-star.fr/star-sf.git
Log | Files | Refs | README | LICENSE

commit 83119ddaaf7651e83206ef370edbd34e4b1a58b1
parent e7eb7a685f375f98f7b08dadea46f638e16631d0
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 27 Oct 2023 15:17:24 +0200

Remove CMake support

POSIX make is now the only supported build system.

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

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,196 +0,0 @@ -# Copyright (C) 2016-2018, 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(ssf C) -enable_testing() - -option(NO_TEST "Do not compile the test pograms" OFF) - -set(SSF_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) - -################################################################################ -# Dependencies -################################################################################ -find_package(RCMake 0.4 REQUIRED) -find_package(RSys 0.6 REQUIRED) -find_package(StarSP 0.12 REQUIRED) -find_package(RSIMD 0.3) -if(RSIMD_FOUND) - option(USE_SIMD "Use SIMD instruction sets" ON) -endif() - -set(CMAKE_MODULE_PATH ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories(${RSys_INCLUDE_DIR} ${StarSP_INCLUDE_DIR}) - -set(_dependencies RSys StarSP) - -if(USE_SIMD) - include_directories(${RSIMD_INCLUDE_DIR}) - set(_dependencies ${_dependencies} RSIMD) -endif() - -rcmake_append_runtime_dirs(_runtime_dirs ${_dependencies}) - -################################################################################ -# Check SIMD support -################################################################################ -if(NOT USE_SIMD) - message(STATUS "Do not use the SIMD instruction sets") -else() - message(STATUS "Use the SIMD instruction sets") - - option(SSF_USE_SIMD_128 "Enable the SIMD-128 instruction sets" ON) - option(SSF_USE_SIMD_256 "Enable the SIMD-256 instruction sets" ON) - - if(SSF_USE_SIMD_128 AND NOT RSIMD_SSE2) - get_property(_docstring CACHE SSF_USE_SIMD_128 PROPERTY HELPSTRING) - set(SSF_USE_SIMD_128 OFF CACHE BOOL ${_docstring} FORCE) - endif() - if(SSF_USE_SIMD_256 AND NOT RSIMD_AVX) - get_property(_docstring CACHE SSF_USE_SIMD_256 PROPERTY HELPSTRING) - set(SSF_USE_SIMD_256 OFF CACHE BOOL ${_docstring} FORCE) - endif() - - if(SSF_USE_SIMD_128) - set(_simd_size "${_simd_size};SSF_USE_SIMD_128") - endif() - - if(SSF_USE_SIMD_256) - set(_simd_size "${_simd_size};SSF_USE_SIMD_256") - endif() -endif() - -################################################################################ -# Define targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 8) -set(VERSION_PATCH 0) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SSF_FILES_DOC COPYING README.md) -set(SSF_FILES_INC_API ssf.h) -set(SSF_FILES_INC - ssf_bsdf_c.h - ssf_fresnel_c.h - ssf_microfacet_distribution_c.h - ssf_optics.h - ssf_phase_c.h) -set(SSF_FILES_SRC - ssf.c - ssf_beckmann_distribution.c - ssf_blinn_distribution.c - ssf_bsdf.c - ssf_fresnel.c - ssf_fresnel_constant.c - ssf_fresnel_dielectric_conductor.c - ssf_fresnel_dielectric_dielectric.c - ssf_fresnel_no_op.c - ssf_lambertian_reflection.c - ssf_microfacet_distribution.c - ssf_microfacet_reflection.c - ssf_phase.c - ssf_phase_discrete.c - ssf_phase_hg.c - ssf_phase_rayleigh.c - ssf_phase_rdgfa.c - ssf_pillbox_distribution.c - ssf_specular_dielectric_dielectric_interface.c - ssf_specular_reflection.c - ssf_thin_specular_dielectric.c) -rcmake_prepend_path(SSF_FILES_SRC ${SSF_SOURCE_DIR}) -rcmake_prepend_path(SSF_FILES_INC ${SSF_SOURCE_DIR}) -rcmake_prepend_path(SSF_FILES_INC_API ${SSF_SOURCE_DIR}) -rcmake_prepend_path(SSF_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) - set(_dependencies ${_dependencies} m) -endif() - -add_library(ssf SHARED ${SSF_FILES_INC} ${SSF_FILES_SRC}) -target_link_libraries(ssf ${_dependencies}) -set_target_properties(ssf PROPERTIES - DEFINE_SYMBOL SSF_SHARED_BUILD - COMPILE_DEFINITIONS "${_simd_size}" - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -rcmake_setup_devel(ssf StarSF ${VERSION} star/ssf_version.h) - -################################################################################ -# Define tests -################################################################################ -if(NOT NO_TEST) - - function(build_test _name) - add_executable(${_name} ${SSF_SOURCE_DIR}/${_name}.c) - target_link_libraries(${_name} ssf RSys StarSP ${MATH_LIB}) - 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_ssf_beckmann_distribution) - new_test(test_ssf_blinn_distribution) - new_test(test_ssf_pillbox_distribution) - new_test(test_ssf_bsdf) - new_test(test_ssf_fresnel) - new_test(test_ssf_fresnel_constant) - new_test(test_ssf_fresnel_dielectric_conductor) - new_test(test_ssf_fresnel_dielectric_dielectric) - new_test(test_ssf_fresnel_no_op) - new_test(test_ssf_lambertian_reflection) - new_test(test_ssf_microfacet_distribution) - new_test(test_ssf_microfacet_reflection) - new_test(test_ssf_phase) - new_test(test_ssf_phase_discrete) - new_test(test_ssf_phase_hg) - new_test(test_ssf_phase_rayleigh) - new_test(test_ssf_specular_dielectric_dielectric_reflection) - new_test(test_ssf_specular_reflection) - new_test(test_ssf_thin_specular_dielectric) - - build_test(test_ssf_phase_rdgfa) - register_test(test_ssf_phase_rdgfa_simd_none test_ssf_phase_rdgfa simd_none) - if(SSF_USE_SIMD_128) - register_test(test_ssf_phase_rdgfa_simd_128 test_ssf_phase_rdgfa simd_128) - endif() - if(SSF_USE_SIMD_256) - register_test(test_ssf_phase_rdgfa_simd_256 test_ssf_phase_rdgfa simd_256) - endif() - - rcmake_copy_runtime_libraries(test_ssf_beckmann_distribution) -endif() - -################################################################################ -# Install directories -################################################################################ -install(TARGETS ssf - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${SSF_FILES_INC_API} DESTINATION include/star/) -install(FILES ${SSF_FILES_DOC} DESTINATION share/doc/star-sf/) -