aboutsummaryrefslogtreecommitdiff
path: root/cmake/ProjConfig.cmake
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-03-27 16:50:03 +0200
committerGitHub <noreply@github.com>2018-03-27 16:50:03 +0200
commitee66d2a1b78669595699a16db097fc7c730e832a (patch)
treef292aa3f62aebd40abb130dd3de99a4c18b6eb2b /cmake/ProjConfig.cmake
parentf413bc8e8d415e7107f6b23274d5c0d1a91f012d (diff)
parent885b196642ea68639b86fa762cc950e19fc40cd6 (diff)
downloadPROJ-ee66d2a1b78669595699a16db097fc7c730e832a.tar.gz
PROJ-ee66d2a1b78669595699a16db097fc7c730e832a.zip
Merge pull request #901 from mwtoews/dot4
Rename CMake infrastructure to remove 4
Diffstat (limited to 'cmake/ProjConfig.cmake')
-rw-r--r--cmake/ProjConfig.cmake42
1 files changed, 42 insertions, 0 deletions
diff --git a/cmake/ProjConfig.cmake b/cmake/ProjConfig.cmake
new file mode 100644
index 00000000..3c5f110d
--- /dev/null
+++ b/cmake/ProjConfig.cmake
@@ -0,0 +1,42 @@
+################################################################################
+# ProjConfig.cmake - CMake build configuration of PROJ library
+################################################################################
+# Copyright (C) 2010 Mateusz Loskot <mateusz@loskot.net>
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+################################################################################
+include (CheckIncludeFiles)
+include (CheckLibraryExists)
+include (CheckFunctionExists)
+
+# check needed include file
+check_include_files (dlfcn.h HAVE_DLFCN_H)
+check_include_files (inttypes.h HAVE_INTTYPES_H)
+check_include_files (jni.h HAVE_JNI_H)
+check_include_files (memory.h HAVE_MEMORY_H)
+check_include_files (stdint.h HAVE_STDINT_H)
+check_include_files (stdlib.h HAVE_STDLIB_H)
+check_include_files (string.h HAVE_STRING_H)
+check_include_files (sys/stat.h HAVE_SYS_STAT_H)
+check_include_files (sys/types.h HAVE_SYS_TYPES_H)
+check_include_files (unistd.h HAVE_UNISTD_H)
+check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
+
+CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
+
+# check libm need on unix
+check_library_exists(m ceil "" HAVE_LIBM)
+
+set(PACKAGE "proj")
+set(PACKAGE_BUGREPORT "https://github.com/OSGeo/proj.4/issues")
+set(PACKAGE_NAME "PROJ")
+set(PACKAGE_STRING "PROJ ${${PROJECT_INTERN_NAME}_VERSION}")
+set(PACKAGE_TARNAME "proj")
+set(PACKAGE_URL "http://proj4.org")
+set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}")
+
+configure_file(cmake/proj_config.cmake.in src/proj_config.h)
+
+