CMake: export Cairo include directories (issue #350)

If a user project is built using a FLTK library generated by CMake
with Cairo support then the CMake variable FLTK_INCLUDE_DIRECTORIES
now includes the required Cairo include directories.
This commit is contained in:
Albrecht Schlosser 2021-12-20 19:18:38 +01:00
parent e186ee0af3
commit b91db00d91
2 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,9 @@ configure_file (
# generate FLTKConfig.cmake for build directory use
set (INCLUDE_DIRS "${FLTK_INCLUDE_DIRS}")
if (FLTK_HAVE_CAIRO)
list (APPEND INCLUDE_DIRS ${PKG_CAIRO_INCLUDE_DIRS})
endif ()
set (CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR})
configure_file(

View File

@ -50,6 +50,9 @@ endif (OPTION_CREATE_LINKS)
# generate FLTKConfig.cmake for installed directory use
set (INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include)
if (FLTK_HAVE_CAIRO)
list (APPEND INCLUDE_DIRS ${PKG_CAIRO_INCLUDE_DIRS})
endif ()
set (CONFIG_PATH ${CMAKE_INSTALL_PREFIX}/${FLTK_CONFIG_PATH})