CMakeLists.txt (834B)
1 # Copyright (c) the JPEG XL Project Authors. All rights reserved. 2 # 3 # Use of this source code is governed by a BSD-style 4 # license that can be found in the LICENSE file. 5 6 # Example project using libjxl. 7 8 cmake_minimum_required(VERSION 3.10) 9 10 project(SAMPLE_LIBJXL LANGUAGES C CXX) 11 12 # Use pkg-config to find libjxl. 13 find_package(PkgConfig) 14 pkg_check_modules(Jxl REQUIRED IMPORTED_TARGET libjxl libjxl_cms libjxl_threads) 15 16 # Build the example encoder/decoder binaries using the default shared libraries 17 # installed. 18 add_executable(decode_oneshot decode_oneshot.cc) 19 target_link_libraries(decode_oneshot PkgConfig::Jxl) 20 21 add_executable(decode_progressive decode_progressive.cc) 22 target_link_libraries(decode_progressive PkgConfig::Jxl) 23 24 add_executable(encode_oneshot encode_oneshot.cc) 25 target_link_libraries(encode_oneshot PkgConfig::Jxl)