aboutsummaryrefslogtreecommitdiff
path: root/docs/source/development
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-02-19 22:39:17 +0100
committerKristian Evers <kristianevers@gmail.com>2018-02-19 22:39:17 +0100
commit43d811d20598abde95a8d177123e9f26fe5229ab (patch)
treec66684d7975798109a072b52bce5e7c5f9bd5182 /docs/source/development
parenta9e08ad008b1ff16d6139aab5e813058c922eef8 (diff)
parentefa636e0d9e0cef5a5fff1b7ed76d0368d20121b (diff)
downloadPROJ-43d811d20598abde95a8d177123e9f26fe5229ab.tar.gz
PROJ-43d811d20598abde95a8d177123e9f26fe5229ab.zip
Merge remote-tracking branch 'osgeo/master' into docs-release-4.10.0
Diffstat (limited to 'docs/source/development')
-rw-r--r--docs/source/development/cmake.rst30
-rw-r--r--docs/source/development/index.rst2
2 files changed, 31 insertions, 1 deletions
diff --git a/docs/source/development/cmake.rst b/docs/source/development/cmake.rst
new file mode 100644
index 00000000..1429ae88
--- /dev/null
+++ b/docs/source/development/cmake.rst
@@ -0,0 +1,30 @@
+.. _cmake:
+
+********************************************************************************
+Using Proj.4 in CMake projects
+********************************************************************************
+
+The recommended way to use the Proj.4 library in a CMake project is to
+link to the imported library target ``${PROJ4_LIBRARIES}`` provided by
+the CMake configuration which comes with the library. Typical usage is:
+
+.. code::
+
+ find_package(PROJ4)
+
+ target_link_libraries(MyApp ${PROJ4_LIBRARIES})
+
+By adding the imported library target ``${PROJ4_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})
+
+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``.
diff --git a/docs/source/development/index.rst b/docs/source/development/index.rst
index 318e3778..743224a6 100644
--- a/docs/source/development/index.rst
+++ b/docs/source/development/index.rst
@@ -16,6 +16,6 @@ PROJ.4 project or using the library in their own software.
errorhandling
threads
reference/index
+ cmake
bindings
migration
-