From 5fc8ab2de9f9e44f593e477defdf9b474871a5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Sun, 14 Feb 2021 10:21:21 +0100 Subject: CMake: Prefer keyword signature of target_link_libraries command Closes #2515 --- docs/source/development/cmake.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/source/development') diff --git a/docs/source/development/cmake.rst b/docs/source/development/cmake.rst index e965f46e..477b4f3b 100644 --- a/docs/source/development/cmake.rst +++ b/docs/source/development/cmake.rst @@ -12,7 +12,7 @@ the CMake configuration which comes with the library. Typical usage is: find_package(PROJ) - target_link_libraries(MyApp ${PROJ_LIBRARIES}) + target_link_libraries(MyApp PRIVATE ${PROJ_LIBRARIES}) By adding the imported library target ``${PROJ_LIBRARIES}`` to the target link libraries, CMake will also pass the include directories to @@ -36,7 +36,7 @@ package to work with pre-7.0 versions of PROJ, you will need to use .. code:: find_package(PROJ4) - target_link_libraries(MyApp ${PROJ4_LIBRARIES}) + target_link_libraries(MyApp PRIVATE ${PROJ4_LIBRARIES}) include_directories(${PROJ4_INCLUDE_DIRS}) This will also find version 7.0. This use of the PROJ4 name will be -- cgit v1.2.3