diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f7b4f4..13da7a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(dragonbox VERSION 1.1.3 @@ -21,7 +21,11 @@ endif() set(dragonbox_headers include/dragonbox/dragonbox.h) -add_library(dragonbox INTERFACE ${dragonbox_headers}) +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.19.0") + add_library(dragonbox INTERFACE ${dragonbox_headers}) +else() + add_library(dragonbox INTERFACE) +endif() add_library(dragonbox::dragonbox ALIAS dragonbox) target_include_directories(dragonbox @@ -33,7 +37,13 @@ target_compile_features(dragonbox INTERFACE cxx_std_17) # ---- Declare library (dragonbox_to_chars) ---- -set(dragonbox_to_chars_headers include/dragonbox/dragonbox_to_chars.h) +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.19.0") + set(dragonbox_to_chars_headers include/dragonbox/dragonbox_to_chars.h) +else() + set(dragonbox_to_chars_headers + ${dragonbox_headers} + include/dragonbox/dragonbox_to_chars.h) +endif() set(dragonbox_to_chars_sources source/dragonbox_to_chars.cpp) diff --git a/subproject/3rdparty/grisu_exact/CMakeLists.txt b/subproject/3rdparty/grisu_exact/CMakeLists.txt index 79a2191..74abca3 100644 --- a/subproject/3rdparty/grisu_exact/CMakeLists.txt +++ b/subproject/3rdparty/grisu_exact/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(grisu_exact LANGUAGES CXX) diff --git a/subproject/3rdparty/ryu/CMakeLists.txt b/subproject/3rdparty/ryu/CMakeLists.txt index 81accdd..792f283 100644 --- a/subproject/3rdparty/ryu/CMakeLists.txt +++ b/subproject/3rdparty/ryu/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(ryu_cmake LANGUAGES C) diff --git a/subproject/3rdparty/schubfach/CMakeLists.txt b/subproject/3rdparty/schubfach/CMakeLists.txt index f988d9c..d9982bc 100644 --- a/subproject/3rdparty/schubfach/CMakeLists.txt +++ b/subproject/3rdparty/schubfach/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(schubfach LANGUAGES CXX) diff --git a/subproject/benchmark/CMakeLists.txt b/subproject/benchmark/CMakeLists.txt index 50b4012..560df4f 100644 --- a/subproject/benchmark/CMakeLists.txt +++ b/subproject/benchmark/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(benchmark LANGUAGES CXX) diff --git a/subproject/common/CMakeLists.txt b/subproject/common/CMakeLists.txt index 142934c..f67e0d5 100644 --- a/subproject/common/CMakeLists.txt +++ b/subproject/common/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(dragonbox_common LANGUAGES CXX) diff --git a/subproject/meta/CMakeLists.txt b/subproject/meta/CMakeLists.txt index 36e291f..51ce408 100644 --- a/subproject/meta/CMakeLists.txt +++ b/subproject/meta/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(dragonbox_meta LANGUAGES CXX) diff --git a/subproject/simple/CMakeLists.txt b/subproject/simple/CMakeLists.txt index d287232..49c1f90 100644 --- a/subproject/simple/CMakeLists.txt +++ b/subproject/simple/CMakeLists.txt @@ -1,10 +1,14 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(dragonbox_simple LANGUAGES CXX) set(dragonbox_simple_headers include/simple_dragonbox.h) -add_library(dragonbox_simple INTERFACE ${dragonbox_simple_headers}) +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.19.0") + add_library(dragonbox_simple INTERFACE ${dragonbox_simple_headers}) +else() + add_library(dragonbox_simple INTERFACE) +endif() add_library(dragonbox::simple ALIAS dragonbox_simple) target_include_directories(dragonbox_simple diff --git a/subproject/test/CMakeLists.txt b/subproject/test/CMakeLists.txt index 5f9b070..c08ed88 100644 --- a/subproject/test/CMakeLists.txt +++ b/subproject/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(dragonboxTests LANGUAGES CXX)