libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

skcms.cmake (1125B)


      1 # Copyright (c) the JPEG XL Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 function(target_link_skcms TARGET_NAME)
     16   target_sources(${TARGET_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/third_party/skcms/skcms.cc")
     17   target_include_directories(${TARGET_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/third_party/skcms/")
     18 
     19   include(CheckCXXCompilerFlag)
     20   check_cxx_compiler_flag("-Wno-psabi" CXX_WPSABI_SUPPORTED)
     21   if(CXX_WPSABI_SUPPORTED)
     22     set_source_files_properties("${PROJECT_SOURCE_DIR}/third_party/skcms/skcms.cc"
     23       PROPERTIES COMPILE_OPTIONS "-Wno-psabi"
     24       TARGET_DIRECTORY ${TARGET_NAME})
     25   endif()
     26 endfunction()