summaryrefslogtreecommitdiff
path: root/Help/guide/tutorial/Step5/MathFunctions/MathFunctions.h
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2022-12-20 11:38:27 +0800
committerBrad King <brad.king@kitware.com>2023-01-20 10:14:39 -0500
commit3b1c19f00a0973d1d70e823cf54a9047d20cb80a (patch)
treea5bb5263dc7661d236a5adae878f1661ca458294 /Help/guide/tutorial/Step5/MathFunctions/MathFunctions.h
parente2be23a2b39f4380f32fe65ba770addc154579c7 (diff)
downloadcmake-3b1c19f00a0973d1d70e823cf54a9047d20cb80a.tar.gz
FindOpenSP: Use pkg-config only as hints for main code path
before this change, pkg_check_modules(.. IMPORTED_TARGET GLOBAL) is used for creating an imported target from which another imported interface library named OpenSP::OpenSP is created. but pkg-config does not account for all of CMake's other search behavior controls, such as CMAKE_FIND_ROOT_PATH. neither does it export the full path with OpenSP_LIBRARY. after this change, the paths found by pkg-config are only used as hints for the find_*() commands. and some cleanup are included: * be QUIET when calling find_package(PkgConfig ..) and pkg_check_modules(..) as they are distracting from user's point of view. what matters is the output of find_package_handle_standard_args() * parse the version and check for the existance of symbol as long as header path is found. because they only use header files. * define OpenSP_LIBRARY as long as it exists. this just follows the convention. as OpenSP_FOUND implies a valid OpenSP_LIBRARY. * wrap and intent multi-line command calls for better readability * check OpenSP_FOUND before adding OpenSP::OpenSP, it's more idiomatic. Fixes: #24313 Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Diffstat (limited to 'Help/guide/tutorial/Step5/MathFunctions/MathFunctions.h')
0 files changed, 0 insertions, 0 deletions