From 5a0551df0a563ac3e3ecc06913030194ecfa6b94 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 27 Jan 2025 15:51:34 +0100 Subject: CMake: fix include directories of bundled image libs If FLTK has been built with bundled image libs the include directory of the *installed* library headers is 'FL/images' relative to the normal 'include' directory. The CMake property "include_directories" is now added to the installed fltk_images library so it is used when building user programs with bundled image libs. --- src/CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c5180ba3f..1cb57df34 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -847,7 +847,19 @@ target_link_libraries(fltk_images PRIVATE ${FLTK_IMAGE_LIBRARIES}) if(FLTK_USE_BUNDLED_JPEG) target_include_directories(fltk_images PUBLIC $ - $) + $) +endif() + +if(FLTK_USE_BUNDLED_PNG) + target_include_directories(fltk_images PUBLIC + $ + $) +endif() + +if(FLTK_USE_BUNDLED_ZLIB) + target_include_directories(fltk_images PUBLIC + $ + $) endif() ####################################################################### -- cgit v1.2.3