CMakeLists.txt (890B)
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(Qt6 QUIET COMPONENTS Widgets) 7 if (NOT Qt6_FOUND) 8 message(WARNING "Qt6 was not found. The directory viewer will not be built.") 9 return() 10 endif () 11 12 if (NOT TARGET icc_detect) 13 message(WARNING "The directory viewer depends on the comparison tool and will also not be built.") 14 return () 15 endif () 16 17 set(CMAKE_INCLUDE_CURRENT_DIR ON) 18 set(CMAKE_AUTOMOC ON) 19 set(CMAKE_AUTOUIC ON) 20 21 add_executable(viewer WIN32 22 load_jxl.cc 23 load_jxl.h 24 main.cc 25 viewer_window.cc 26 viewer_window.h 27 viewer_window.ui 28 ) 29 target_include_directories(viewer PRIVATE 30 $<TARGET_PROPERTY:lcms2,INCLUDE_DIRECTORIES> 31 "${PROJECT_SOURCE_DIR}" 32 ) 33 target_link_libraries(viewer 34 Qt6::Widgets 35 icc_detect 36 jxl 37 jxl_threads 38 lcms2 39 )