summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-04-30 12:46:58 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-04-30 12:46:58 +0200
commit2555e3b37e6218378e7becbb2b62ab6e7f1c1cd1 (patch)
tree8f52e3b4c372ee170ac2e220c73f59072ed6835c /CMake
parent4ba92a99bb259d19e524fb82f16ba8e2d4999def (diff)
Fix build with Cairo for CMake < 3.13
target_link_directories() was introduced in CMake 3.13
Diffstat (limited to 'CMake')
-rw-r--r--CMake/fl_create_example.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMake/fl_create_example.cmake b/CMake/fl_create_example.cmake
index 3ea51be74..a245bb5ea 100644
--- a/CMake/fl_create_example.cmake
+++ b/CMake/fl_create_example.cmake
@@ -116,7 +116,11 @@ macro (CREATE_EXAMPLE NAME SOURCES LIBRARIES)
target_link_libraries (${TARGET_NAME} ${LIBRARIES})
if (FLTK_HAVE_CAIRO)
- target_link_directories (${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARY_DIRS})
+ if (CMAKE_VERSION VERSION_LESS "3.13")
+ link_directories (${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARY_DIRS})
+ else()
+ target_link_directories (${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARY_DIRS})
+ endif()
endif (FLTK_HAVE_CAIRO)
if (ICON_PATH)