summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-04-05 23:19:09 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-04-05 23:19:09 +0000
commit2a3b224cecda83e1b10b9ab988e8bcc8d9bfb15a (patch)
tree7c70ca92e07cc8f7e63db51b029b84193f551c1b
parentMore cleanup of document.h. (diff)
downloadinkscape-2a3b224cecda83e1b10b9ab988e8bcc8d9bfb15a.tar.gz
inkscape-2a3b224cecda83e1b10b9ab988e8bcc8d9bfb15a.zip
CMake: Fix module FindDoubleConversion.cmake
The module did not properly handle required libraries that were not found. Ensure proper behavior by sticking to CMake-recommended standard variable names.
-rw-r--r--CMakeScripts/Modules/FindDoubleConversion.cmake30
-rw-r--r--src/2geom/CMakeLists.txt4
2 files changed, 18 insertions, 16 deletions
diff --git a/CMakeScripts/Modules/FindDoubleConversion.cmake b/CMakeScripts/Modules/FindDoubleConversion.cmake
index fee62ced1..bd4c0028e 100644
--- a/CMakeScripts/Modules/FindDoubleConversion.cmake
+++ b/CMakeScripts/Modules/FindDoubleConversion.cmake
@@ -1,25 +1,27 @@
# - Try to find double-conversion
# Once done, this will define
#
-# DOUBLE_CONVERSION_FOUND - system has double-conversion
-# DOUBLE_CONVERSION_INCLUDE_DIRS - the double-conversion include directories
-# DOUBLE_CONVERSION_LIBRARIES - link these to use double-conversion
+# DoubleConversion_FOUND - system has double-conversion
+# DoubleConversion_INCLUDE_DIRS - the double-conversion include directories
+# DoubleConversion_LIBRARIES - link these to use double-conversion
include(FindPackageHandleStandardArgs)
-find_library(DOUBLE_CONVERSION_LIBRARY double-conversion
- PATHS ${DOUBLE_CONVERSION_LIBRARYDIR})
+find_library(DoubleConversion_LIBRARY double-conversion
+ PATHS ${DoubleConversion_LIBRARYDIR})
-find_path(DOUBLE_CONVERSION_INCLUDE_DIR double-conversion/double-conversion.h
- PATHS ${DOUBLE_CONVERSION_INCLUDEDIR})
+find_path(DoubleConversion_INCLUDE_DIR double-conversion/double-conversion.h
+ PATHS ${DoubleConversion_INCLUDEDIR})
-find_package_handle_standard_args(double_conversion DEFAULT_MSG
- DOUBLE_CONVERSION_LIBRARY
- DOUBLE_CONVERSION_INCLUDE_DIR)
+find_package_handle_standard_args(DoubleConversion DEFAULT_MSG
+ DoubleConversion_LIBRARY
+ DoubleConversion_INCLUDE_DIR)
mark_as_advanced(
- DOUBLE_CONVERSION_LIBRARY
- DOUBLE_CONVERSION_INCLUDE_DIR)
+ DoubleConversion_LIBRARY
+ DoubleConversion_INCLUDE_DIR)
-set(DOUBLE_CONVERSION_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
-set(DOUBLE_CONVERSION_INCLUDE_DIRS ${DOUBLE_CONVERSION_INCLUDE_DIR})
+if(DoubleConversion_FOUND)
+ set(DoubleConversion_LIBRARIES ${DoubleConversion_LIBRARY})
+ set(DoubleConversion_INCLUDE_DIRS ${DoubleConversion_INCLUDE_DIR})
+endif()
diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt
index 988fd1b54..3c18c4ffd 100644
--- a/src/2geom/CMakeLists.txt
+++ b/src/2geom/CMakeLists.txt
@@ -131,5 +131,5 @@ set(2geom_SRC
# make lib for 2geom_LIB
add_inkscape_lib(2geom_LIB "${2geom_SRC}")
-target_include_directories(2geom_LIB PRIVATE ${DOUBLE_CONVERSION_INCLUDE_DIRS})
-target_link_libraries(2geom_LIB PRIVATE ${DOUBLE_CONVERSION_LIBRARIES})
+target_include_directories(2geom_LIB PRIVATE ${DoubleConversion_INCLUDE_DIRS})
+target_link_libraries(2geom_LIB PRIVATE ${DoubleConversion_LIBRARIES})