Backed out 2 changesets (bug 903746) for causing non-unified build bustages on nsIPri...
[gecko.git] / third_party / jpeg-xl / third_party / skcms.cmake
blobc3830413463858bc7fff962e59c68a21e95f36b5
1 # Copyright (c) the JPEG XL Project
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
7 #      http://www.apache.org/licenses/LICENSE-2.0
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.
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/")
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()