diff options
Diffstat (limited to 'Help/guide/tutorial/Step3/MathFunctions')
-rw-r--r-- | Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt index 90d6c24958..6f86ffef5b 100644 --- a/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt +++ b/Help/guide/tutorial/Step3/MathFunctions/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(MathFunctions MathFunctions.cxx mysqrt.cxx) +add_library(MathFunctions MathFunctions.cxx) # TODO 1: State that anybody linking to MathFunctions needs to include the # current source directory, while MathFunctions itself doesn't. @@ -8,4 +8,11 @@ add_library(MathFunctions MathFunctions.cxx mysqrt.cxx) option(USE_MYMATH "Use tutorial provided math implementation" ON) if (USE_MYMATH) target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH") + + # library that just does sqrt + add_library(SqrtLibrary STATIC + mysqrt.cxx + ) + + target_link_libraries(MathFunctions PUBLIC SqrtLibrary) endif() |