Tutorial: Install correctly when built statically

When built statically we failed to install the SqrtLibrary
This commit is contained in:
Robert Maynard
2020-06-16 15:38:57 -04:00
parent f2c1debe40
commit 0fdfd6bf37
5 changed files with 23 additions and 7 deletions

View File

@@ -47,5 +47,9 @@ endif()
target_compile_definitions(MathFunctions PRIVATE "EXPORTING_MYMATH")
# install rules
install(TARGETS MathFunctions DESTINATION lib)
set(installable_libs MathFunctions)
if(TARGET SqrtLibrary)
list(APPEND installable_libs SqrtLibrary)
endif()
install(TARGETS ${installable_libs} DESTINATION lib)
install(FILES MathFunctions.h DESTINATION include)