mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 10:18:34 -06:00
Tutorial: Improve Step 2
* Fix typo in #include * Remove CMakeLists file that users should create * Clarify which files users are expected to create * Highlight the importance of configuring TutorialConfig.h.in after the MY_MATH option has been set
This commit is contained in:
@@ -23,7 +23,7 @@ add_subdirectory(MathFunctions)
|
||||
|
||||
# add the executable
|
||||
add_executable(Tutorial tutorial.cxx)
|
||||
target_link_libraries(Tutorial MathFunctions)
|
||||
target_link_libraries(Tutorial PUBLIC MathFunctions)
|
||||
|
||||
# add the binary tree to the search path for include files
|
||||
# so that we will find TutorialConfig.h
|
||||
|
||||
@@ -43,12 +43,6 @@ if(USE_MYMATH)
|
||||
POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
|
||||
)
|
||||
|
||||
target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH")
|
||||
if(HAVE_LOG AND HAVE_EXP)
|
||||
target_compile_definitions(SqrtLibrary
|
||||
PRIVATE "HAVE_LOG" "HAVE_EXP")
|
||||
endif()
|
||||
|
||||
target_link_libraries(MathFunctions PRIVATE SqrtLibrary)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// the configured version number
|
||||
// the configured options and settings for Tutorial
|
||||
#define Tutorial_VERSION_MAJOR @Tutorial_VERSION_MAJOR@
|
||||
#define Tutorial_VERSION_MINOR @Tutorial_VERSION_MINOR@
|
||||
|
||||
Reference in New Issue
Block a user