mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Tutorial: Update step 3 style
This commit is contained in:
@@ -14,6 +14,8 @@ option(USE_MYMATH "Use tutorial provided math implementation" ON)
|
||||
# to the source code
|
||||
configure_file(TutorialConfig.h.in TutorialConfig.h)
|
||||
|
||||
# TODO 2: Remove EXTRA_INCLUDES list
|
||||
|
||||
# add the MathFunctions library
|
||||
if(USE_MYMATH)
|
||||
add_subdirectory(MathFunctions)
|
||||
@@ -26,6 +28,8 @@ add_executable(Tutorial tutorial.cxx)
|
||||
|
||||
target_link_libraries(Tutorial PUBLIC ${EXTRA_LIBS})
|
||||
|
||||
# TODO 3: Remove use of EXTRA_INCLUDES
|
||||
|
||||
# add the binary tree to the search path for include files
|
||||
# so that we will find TutorialConfig.h
|
||||
target_include_directories(Tutorial PUBLIC
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
add_library(MathFunctions mysqrt.cxx)
|
||||
|
||||
# TODO 1: State that anybody linking to MathFunctions needs to include the
|
||||
# current source directory, while MathFunctions itself doesn't.
|
||||
# Hint: Use target_include_directories with the INTERFACE keyword
|
||||
|
||||
Reference in New Issue
Block a user