summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/double-conversion
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-05-21 17:09:47 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-05-22 07:25:41 +0000
commit774088b677b03cd1857fd352f305a5fe15b9f5eb (patch)
tree9e2015cf4419a58e4664ee5374f1f986857f2e3a /src/3rdparty/double-conversion
parent4e7756a6cd48716ff37d071fe660bb0e9edfa89f (diff)
Build and use double-conversion library shipped by Qt when needed
Some Linux distros might not have a double-conversion library. Because it is such an essential library for QtCore, compile and use the the copy of the library bundled with Qt. Also change library name to be a proper target with double colons, so that in case the library is not found for some reason, the CMake configure step would fail, instead of failing at link time. Task-number: QTBUG-74133 Change-Id: I9f3b4298ae6e952891a7a89541d46878176bf1ce Fixes: QTBUG-75891 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/3rdparty/double-conversion')
-rw-r--r--src/3rdparty/double-conversion/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/3rdparty/double-conversion/CMakeLists.txt b/src/3rdparty/double-conversion/CMakeLists.txt
new file mode 100644
index 0000000000..7450bc48ec
--- /dev/null
+++ b/src/3rdparty/double-conversion/CMakeLists.txt
@@ -0,0 +1,21 @@
+# special case begin
+
+add_library(QtDoubleConversion STATIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/bignum.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/bignum-dtoa.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/cached-powers.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/diy-fp.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/double-conversion.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/fast-dtoa.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/fixed-dtoa.cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/strtod.cc
+ )
+
+target_include_directories(QtDoubleConversion PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/double-conversion>
+ )
+
+qt_install_3rdparty_library(QtDoubleConversion)
+# special case end