diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-02-22 13:03:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-22 13:03:57 +0100 |
| commit | 1a7f5907c58af8c464be79187f176e38f7cf98e2 (patch) | |
| tree | 072c02fe6ab5a1bd58e184d5924ff1e72ca5c6d2 | |
| parent | 410631e5a25ae88f81545393240da86722f289f9 (diff) | |
| parent | 93bd3c37a3d8a6bb6994cc227f1b1597e372e788 (diff) | |
| download | PROJ-1a7f5907c58af8c464be79187f176e38f7cf98e2.tar.gz PROJ-1a7f5907c58af8c464be79187f176e38f7cf98e2.zip | |
Merge pull request #1282 from mwtoews/cmake
CMake warning about removing second proj_config.h
| -rw-r--r-- | cmake/ProjConfig.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/ProjConfig.cmake b/cmake/ProjConfig.cmake index a97ea9b3..ada827ea 100644 --- a/cmake/ProjConfig.cmake +++ b/cmake/ProjConfig.cmake @@ -37,6 +37,14 @@ set(PACKAGE_TARNAME "proj") set(PACKAGE_URL "https://proj4.org") set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}") -configure_file(cmake/proj_config.cmake.in src/proj_config.h) +# check if a second proj_config.h exists (created by ./configure) +# as this is within CMake's C_INCLUDES / CXX_INCLUDES +set(AUTOCONF_PROJ_CONFIG_H "${CMAKE_SOURCE_DIR}/src/proj_config.h") +if(EXISTS ${AUTOCONF_PROJ_CONFIG_H}) + message(WARNING "Autoconf's ${AUTOCONF_PROJ_CONFIG_H} may interfere " + "with this CMake build. Run 'make distclean' in the " + "source directory before CMake's build.") +endif() +configure_file(cmake/proj_config.cmake.in src/proj_config.h) |
