From 410a01c6db6363cb03bacf73800a60bb7a6bdafb Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 26 Jul 2021 17:14:29 +0200 Subject: Add CMake compatibility functions and macros CMake/compatibility.cmake: define functions and macros to be used if a particular CMake functionality requires a higher CMake version than FLTK's minimum CMake version, see 'cmake_minimum_required(...)' in the root CMakeLists.txt. Note: target_link_directories() is available since CMake 3.13 --- fluid/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fluid') diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt index 2377d721f..dce95ca3a 100644 --- a/fluid/CMakeLists.txt +++ b/fluid/CMakeLists.txt @@ -71,11 +71,7 @@ endif (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL)) target_link_libraries (fluid fltk fltk_images fltk_forms) if (FLTK_HAVE_CAIRO) - if (CMAKE_VERSION VERSION_LESS "3.13") - link_directories (${PKG_CAIRO_LIBRARY_DIRS}) - else() - target_link_directories (fluid PRIVATE ${PKG_CAIRO_LIBRARY_DIRS}) - endif() + fl_target_link_directories (fluid PRIVATE "${PKG_CAIRO_LIBRARY_DIRS}") endif (FLTK_HAVE_CAIRO) if (USE_GDIPLUS) # can only be true on Windows -- cgit v1.2.3