diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-08-26 18:07:54 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-08-26 18:07:54 +0200 |
| commit | 0f1492bba6a8a4a685b0c206ddf08965b51abd41 (patch) | |
| tree | a4e125a86072f4c3ed8e87ee970cb8fdf64c033a /CMakeLists.txt | |
| parent | 372fe4cc997eb8fd0f71db75061d72b06f598d24 (diff) | |
Update 'cmake_minimum_required' version to 3.12.0
Linking against OBJECT libraries as done in fluid since May 2023
and in shared library builds using MSVC even much earlier
requires at least CMake 3.12.
This commit adds the requirement explicitly to abort the build early.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f00237a35..ad47d4139 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org) # Originally written by Michael Surette # -# Copyright 1998-2022 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,11 +16,17 @@ # ####################################################################### -# set CMake minimum version (must be before `project()` +# Set CMake minimum version first: must be before `project()` ####################################################################### -# Minimum CMake version required by FLTK 1.4 (06/2020, work in progress) -cmake_minimum_required (VERSION 3.2.3 FATAL_ERROR) +# Minimum CMake version required by FLTK 1.4 + +# Note 1: Linking against OBJECT libraries (fluid, test) requires +# at least CMake 3.12.0 +# Note 2: Used in fluid since 05/2023, +# used for Windows (MSVC) shared lib builds much earlier + +cmake_minimum_required (VERSION 3.12.0 FATAL_ERROR) # 05/2023 ####################################################################### @@ -83,7 +89,7 @@ set (debug_build 0) # set to 1 to show debug info if (debug_build) message ("") - message (STATUS "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt: set debug_build to 0 to disable the following info:") + message (STATUS "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt: set 'debug_build' to 0 to disable the following info:") fl_debug_var (WIN32) fl_debug_var (MINGW) fl_debug_var (CYGWIN) |
