aboutsummaryrefslogtreecommitdiff
path: root/docs/source/development
diff options
context:
space:
mode:
authorCharles Karney <charles@karney.com>2020-02-04 19:15:57 -0500
committerGitHub <noreply@github.com>2020-02-04 19:15:57 -0500
commit1067766790174665b455ff94846e37531225d69b (patch)
tree5ac9b164dee3890f63f1e6c9ab0f6b81764e3633 /docs/source/development
parentafda50628d690bb56debbe1a4116bc32c3143943 (diff)
parentc74781ea2710f18a9f1c9728fa5eca5d3601ad5b (diff)
downloadPROJ-1067766790174665b455ff94846e37531225d69b.tar.gz
PROJ-1067766790174665b455ff94846e37531225d69b.zip
Merge pull request #1910 from cffk/cmake-proj
Make PROJ the CMake project name addressing first stage of #1885 Let's go with this! It's conceivable that there's some wrinkle I haven't thought about. So let's expose the changes to a wider community.
Diffstat (limited to 'docs/source/development')
-rw-r--r--docs/source/development/cmake.rst25
1 files changed, 19 insertions, 6 deletions
diff --git a/docs/source/development/cmake.rst b/docs/source/development/cmake.rst
index 5a8ce624..e965f46e 100644
--- a/docs/source/development/cmake.rst
+++ b/docs/source/development/cmake.rst
@@ -5,26 +5,39 @@ Using PROJ in CMake projects
********************************************************************************
The recommended way to use the PROJ library in a CMake project is to
-link to the imported library target ``${PROJ4_LIBRARIES}`` provided by
+link to the imported library target ``${PROJ_LIBRARIES}`` provided by
the CMake configuration which comes with the library. Typical usage is:
.. code::
- find_package(PROJ4)
+ find_package(PROJ)
- target_link_libraries(MyApp ${PROJ4_LIBRARIES})
+ target_link_libraries(MyApp ${PROJ_LIBRARIES})
-By adding the imported library target ``${PROJ4_LIBRARIES}`` to the
+By adding the imported library target ``${PROJ_LIBRARIES}`` to the
target link libraries, CMake will also pass the include directories to
the compiler. This requires that you use CMake version 2.8.11 or later.
If you are using an older version of CMake, then add
.. code::
- include_directories(${PROJ4_INCLUDE_DIRS})
+ include_directories(${PROJ_INCLUDE_DIRS})
The CMake command ``find_package`` will look for the configuration in a
number of places. The lookup can be adjusted for all packages by setting
the cache variable or environment variable ``CMAKE_PREFIX_PATH``. In
particular, CMake will consult (and set) the cache variable
-``PROJ4_DIR``.
+``PROJ_DIR``.
+
+The old CMake name for the PROJ project was "PROJ4" and the switch to
+the name "PROJ" was made with version 7.0. So if you expect your
+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})
+ include_directories(${PROJ4_INCLUDE_DIRS})
+
+This will also find version 7.0. This use of the PROJ4 name will be
+phased out at some point.