CMakeLists.txt (851B)
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 find_package(PkgConfig) 7 pkg_check_modules(Gimp IMPORTED_TARGET gimp-2.0>=2.10 gimpui-2.0>=2.10) 8 9 if (NOT Gimp_FOUND) 10 message(WARNING "Gimp development libraries not found, the Gimp plugin will not be built") 11 return () 12 endif () 13 14 add_executable(file-jxl WIN32 15 common.h 16 common.cc 17 file-jxl-load.cc 18 file-jxl-load.h 19 file-jxl-save.cc 20 file-jxl-save.h 21 file-jxl.cc) 22 target_link_libraries(file-jxl jxl jxl_threads PkgConfig::Gimp) 23 24 target_include_directories(file-jxl PUBLIC 25 ${PROJECT_SOURCE_DIR}) # for plugins/gimp absolute paths. 26 27 pkg_get_variable(GIMP_LIB_DIR gimp-2.0 gimplibdir) 28 install(TARGETS file-jxl RUNTIME DESTINATION "${GIMP_LIB_DIR}/plug-ins/file-jxl/")