diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-07-26 17:14:29 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-07-26 17:40:26 +0200 |
| commit | 410a01c6db6363cb03bacf73800a60bb7a6bdafb (patch) | |
| tree | a03dd08eeebd311d98cf502953306e45aeebb2b2 /CMake/fl_create_example.cmake | |
| parent | ded0253bb759189fe74a46b7ab23461b28e9bd3a (diff) | |
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
Diffstat (limited to 'CMake/fl_create_example.cmake')
| -rw-r--r-- | CMake/fl_create_example.cmake | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/CMake/fl_create_example.cmake b/CMake/fl_create_example.cmake index 38ffe98e1..66c8efc58 100644 --- a/CMake/fl_create_example.cmake +++ b/CMake/fl_create_example.cmake @@ -117,15 +117,12 @@ macro (CREATE_EXAMPLE NAME SOURCES LIBRARIES) target_link_libraries (${TARGET_NAME} ${LIBRARIES}) if (FLTK_HAVE_CAIRO) - if (CMAKE_VERSION VERSION_LESS "3.13") - link_directories (${PKG_CAIRO_LIBRARY_DIRS}) - else() - target_link_directories (${TARGET_NAME} PRIVATE ${PKG_CAIRO_LIBRARY_DIRS}) - endif() - endif (FLTK_HAVE_CAIRO) + fl_target_link_directories (${TARGET_NAME} PRIVATE "${PKG_CAIRO_LIBRARY_DIRS}") + endif () + if (USE_GDIPLUS) # can only be true on Windows target_link_libraries (${TARGET_NAME} gdiplus) - endif (USE_GDIPLUS) + endif () if (MAC_BUNDLE) if (PLIST) |
