summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2025-01-27 15:51:34 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2025-01-27 15:51:34 +0100
commit5a0551df0a563ac3e3ecc06913030194ecfa6b94 (patch)
tree04af5516394c2092534669ce6e5d96d6747c9111 /src
parent6b87b01b657f37a11637607373c4c04401850960 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt14
1 files changed, 13 insertions, 1 deletions
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
$<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()
#######################################################################