summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-11-15 21:30:12 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-11-15 21:30:12 +0100
commit6f021d483093a51e736d38e12491fbe5a70d302c (patch)
tree16c8f4a677c00e617c842dff8634f0018f619798 /CMake
parented7c2f1464346c386825b6ef76a507f481604024 (diff)
CMake: Raise cmake_minimum_required from 3.12 to 3.15
Remove code that checks CMake versions lower than 3.15
Diffstat (limited to 'CMake')
-rw-r--r--CMake/compatibility.cmake20
-rw-r--r--CMake/fl_create_example.cmake2
-rw-r--r--CMake/options.cmake2
-rw-r--r--CMake/setup.cmake8
4 files changed, 13 insertions, 19 deletions
diff --git a/CMake/compatibility.cmake b/CMake/compatibility.cmake
index 338e9b9e3..233b4001f 100644
--- a/CMake/compatibility.cmake
+++ b/CMake/compatibility.cmake
@@ -1,7 +1,7 @@
#
# CMake compatibility functions and macros for the Fast Light Tool Kit (FLTK)
#
-# Copyright 1998-2021 by Bill Spitzak and others.
+# Copyright 1998-2023 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
################################################################################
#
-# The functions (and macros) in this file are defined to simplify CMake
+# The functions and maybe macros in this file are defined to simplify CMake
# code that uses features not available in all supported CMake versions.
# Functions should be preferred (rather than macros) because functions
# have their own variable scope.
@@ -33,6 +33,12 @@
#
################################################################################
+
+# Right now we don't need compatibility functions
+# This file is currently "empty" but left for documentation purposes
+# An example function documentation follows...
+
+
################################################################################
#
# function fl_target_link_directories - add link directories to target
@@ -62,13 +68,3 @@
# can be an empty list.
#
################################################################################
-
-function (fl_target_link_directories TARGET SCOPE DIRS)
-
- if (CMAKE_VERSION VERSION_LESS "3.13")
- link_directories (${DIRS})
- else ()
- target_link_directories (${TARGET} ${SCOPE} ${DIRS})
- endif ()
-
-endfunction () # fl_target_link_directories()
diff --git a/CMake/fl_create_example.cmake b/CMake/fl_create_example.cmake
index 77fb24d0b..1ff85d17c 100644
--- a/CMake/fl_create_example.cmake
+++ b/CMake/fl_create_example.cmake
@@ -125,7 +125,7 @@ function (CREATE_EXAMPLE NAME SOURCES LIBRARIES)
endif ()
if (FLTK_HAVE_CAIRO AND PKG_CAIRO_LIBRARY_DIRS)
- fl_target_link_directories (${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARY_DIRS})
+ target_link_directories (${TARGET_NAME} PUBLIC ${PKG_CAIRO_LIBRARY_DIRS})
endif ()
if (USE_GDIPLUS) # can only be true on Windows
diff --git a/CMake/options.cmake b/CMake/options.cmake
index 9f3079595..6e2443cfb 100644
--- a/CMake/options.cmake
+++ b/CMake/options.cmake
@@ -536,7 +536,7 @@ if (OPTION_USE_GL)
unset(HAVE_GL_GLU_H CACHE)
find_file (HAVE_GL_GLU_H GL/glu.h PATHS ${X11_INCLUDE_DIR})
else()
- include (FindOpenGL)
+ find_package(OpenGL)
if (APPLE)
set (HAVE_GL_GLU_H ${HAVE_OPENGL_GLU_H})
endif (APPLE)
diff --git a/CMake/setup.cmake b/CMake/setup.cmake
index 1ff5585ce..7dd91ebd4 100644
--- a/CMake/setup.cmake
+++ b/CMake/setup.cmake
@@ -82,11 +82,9 @@ include(TestBigEndian)
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
if (CMAKE_GENERATOR MATCHES "Xcode")
- if (NOT (CMAKE_VERSION VERSION_LESS 3.9)) # CMake 3.9 and up
- # Tell Xcode to regenerate scheme information automatically whenever the
- # CMake configuration changes without asking the user
- set (CMAKE_XCODE_GENERATE_SCHEME 1)
- endif()
+ # Tell Xcode to regenerate scheme information automatically whenever the
+ # CMake configuration changes without asking the user
+ set (CMAKE_XCODE_GENERATE_SCHEME 1)
endif()
if (APPLE)