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.
This commit is contained in:
Albrecht Schlosser 2025-01-27 15:51:34 +01:00
parent 6b87b01b65
commit 5a0551df0a

View File

@ -847,7 +847,19 @@ target_link_libraries(fltk_images PRIVATE ${FLTK_IMAGE_LIBRARIES})
if(FLTK_USE_BUNDLED_JPEG)
target_include_directories(fltk_images PUBLIC
$<BUILD_INTERFACE:${FLTK_SOURCE_DIR}/jpeg>
$<INSTALL_INTERFACE:include>)
$<INSTALL_INTERFACE:include/FL/images>)
endif()
if(FLTK_USE_BUNDLED_PNG)
target_include_directories(fltk_images PUBLIC
$<BUILD_INTERFACE:${FLTK_SOURCE_DIR}/png>
$<INSTALL_INTERFACE:include/FL/images>)
endif()
if(FLTK_USE_BUNDLED_ZLIB)
target_include_directories(fltk_images PUBLIC
$<BUILD_INTERFACE:${FLTK_SOURCE_DIR}/zlib>
$<INSTALL_INTERFACE:include/FL/images>)
endif()
#######################################################################