summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Complete/MathFunctions
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-06-16 19:38:57 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-06-16 19:38:57 (GMT)
commit0fdfd6bf37146e1b09e410ff5f729f9ea8d3ac1a (patch)
tree476eb80eba83856bf332e7cf9c325376bbab16b8 /Help/guide/tutorial/Complete/MathFunctions
parentf2c1debe403c4e9929a6dc2b1b6f63a7f6b052cc (diff)
downloadCMake-0fdfd6bf37146e1b09e410ff5f729f9ea8d3ac1a.zip
CMake-0fdfd6bf37146e1b09e410ff5f729f9ea8d3ac1a.tar.gz
CMake-0fdfd6bf37146e1b09e410ff5f729f9ea8d3ac1a.tar.bz2
Tutorial: Install correctly when built statically
When built statically we failed to install the SqrtLibrary
Diffstat (limited to 'Help/guide/tutorial/Complete/MathFunctions')
-rw-r--r--Help/guide/tutorial/Complete/MathFunctions/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Help/guide/tutorial/Complete/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Complete/MathFunctions/CMakeLists.txt
index c911625..a47d5e0 100644
--- a/Help/guide/tutorial/Complete/MathFunctions/CMakeLists.txt
+++ b/Help/guide/tutorial/Complete/MathFunctions/CMakeLists.txt
@@ -57,7 +57,11 @@ set_property(TARGET MathFunctions PROPERTY VERSION "1.0.0")
set_property(TARGET MathFunctions PROPERTY SOVERSION "1")
# install rules
-install(TARGETS MathFunctions tutorial_compiler_flags
+set(installable_libs MathFunctions tutorial_compiler_flags)
+if(TARGET SqrtLibrary)
+ list(APPEND installable_libs SqrtLibrary)
+endif()
+install(TARGETS ${installable_libs}
DESTINATION lib
EXPORT MathFunctionsTargets)
install(FILES MathFunctions.h DESTINATION include)