diff options
Diffstat (limited to 'Help/guide/tutorial/Step11/MathFunctions')
-rw-r--r-- | Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt index df9f4df..e6cb8ba 100644 --- a/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt +++ b/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt @@ -11,6 +11,8 @@ target_include_directories(MathFunctions option(USE_MYMATH "Use tutorial provided math implementation" ON) if(USE_MYMATH) + target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH") + # first we add the executable that generates the table add_executable(MakeTable MakeTable.cxx) target_link_libraries(MakeTable tutorial_compiler_flags) @@ -33,13 +35,12 @@ if(USE_MYMATH) ${CMAKE_CURRENT_BINARY_DIR} ) + # state that SqrtLibrary need PIC when the default is shared libraries set_target_properties(SqrtLibrary PROPERTIES POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS} ) target_link_libraries(SqrtLibrary PUBLIC tutorial_compiler_flags) - - target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH") target_link_libraries(MathFunctions PRIVATE SqrtLibrary) endif() |