CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/ext/SPIRV-Cross-build/CMakeLists.txt
Views: 1401
# Copyright 2016 Google Inc.1#2# Licensed under the Apache License, Version 2.0 (the "License");3# you may not use this file except in compliance with the License.4# You may obtain a copy of the License at5#6# http://www.apache.org/licenses/LICENSE-2.07#8# Unless required by applicable law or agreed to in writing, software9# distributed under the License is distributed on an "AS IS" BASIS,10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11# See the License for the specific language governing permissions and12# limitations under the License.1314cmake_minimum_required(VERSION 3.0)15project(SPIRV-Cross)16enable_testing()1718option(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS "Instead of throwing exceptions assert" ON)1920set(SRCDIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Cross")2122add_library(spirv-cross-core STATIC23${SRCDIR}/GLSL.std.450.h24${SRCDIR}/spirv_common.hpp25${SRCDIR}/spirv.hpp26${SRCDIR}/spirv_cross.hpp27${SRCDIR}/spirv_cross.cpp28${SRCDIR}/spirv_cross_containers.hpp29${SRCDIR}/spirv_cross_error_handling.hpp30${SRCDIR}/spirv_cross_util.hpp31${SRCDIR}/spirv_cross_util.cpp32${SRCDIR}/spirv_cfg.hpp33${SRCDIR}/spirv_cfg.cpp34${SRCDIR}/spirv_cross_parsed_ir.hpp35${SRCDIR}/spirv_cross_parsed_ir.cpp36${SRCDIR}/spirv_parser.hpp37${SRCDIR}/spirv_parser.cpp)3839add_library(spirv-cross-glsl STATIC40${SRCDIR}/spirv_glsl.cpp41${SRCDIR}/spirv_glsl.hpp)4243add_library(spirv-cross-cpp STATIC44${SRCDIR}/spirv_cpp.hpp45${SRCDIR}/spirv_cpp.cpp)4647add_library(spirv-cross-msl STATIC48${SRCDIR}/spirv_msl.hpp49${SRCDIR}/spirv_msl.cpp)5051add_library(spirv-cross-hlsl STATIC52${SRCDIR}/spirv_hlsl.hpp53${SRCDIR}/spirv_hlsl.cpp)5455#add_executable(spirv-cross main.cpp)56#target_link_libraries(spirv-cross spirv-cross-glsl spirv-cross-cpp spirv-cross-msl spirv-cross-hlsl spirv-cross-core)57target_link_libraries(spirv-cross-glsl spirv-cross-core)58target_link_libraries(spirv-cross-msl spirv-cross-glsl)59target_link_libraries(spirv-cross-cpp spirv-cross-glsl)60target_link_libraries(spirv-cross-hlsl spirv-cross-glsl)61target_include_directories(spirv-cross-core PUBLIC ${SRCDIR})6263set(spirv-compiler-options "")64set(spirv-compiler-defines "")6566if(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)67set(spirv-compiler-defines ${spirv-compiler-defines} SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)68endif()6970# To specify special debug or optimization options, use71# -DCMAKE_CXX_COMPILE_FLAGS72# However, we require the C++11 dialect.73if (NOT "${MSVC}")74set(spirv-compiler-options ${spirv-compiler-options})75set(spirv-compiler-defines ${spirv-compiler-defines} __STDC_LIMIT_MACROS)7677if(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)78set(spirv-compiler-options ${spirv-compiler-options} -fno-exceptions)79endif()80endif()8182target_compile_options(spirv-cross-core PRIVATE ${spirv-compiler-options})83target_compile_options(spirv-cross-glsl PRIVATE ${spirv-compiler-options})84target_compile_options(spirv-cross-msl PRIVATE ${spirv-compiler-options})85target_compile_options(spirv-cross-cpp PRIVATE ${spirv-compiler-options})86target_compile_options(spirv-cross-hlsl PRIVATE ${spirv-compiler-options})87target_compile_definitions(spirv-cross-core PRIVATE ${spirv-compiler-defines})88target_compile_definitions(spirv-cross-glsl PRIVATE ${spirv-compiler-defines})89target_compile_definitions(spirv-cross-msl PRIVATE ${spirv-compiler-defines})90target_compile_definitions(spirv-cross-cpp PRIVATE ${spirv-compiler-defines})91target_compile_definitions(spirv-cross-hlsl PRIVATE ${spirv-compiler-defines})929394