aboutsummaryrefslogtreecommitdiff
path: root/data/CMakeLists.txt
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-11-14 17:40:42 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-11-14 22:48:29 +0100
commitd928db15d53805d9b728b440079756081961c536 (patch)
treee862a961d26bedb34c58e4f28ef0bdeedb5f3225 /data/CMakeLists.txt
parent330e8bf686f9c4524075ca1ff50cbca6c9e091da (diff)
downloadPROJ-d928db15d53805d9b728b440079756081961c536.tar.gz
PROJ-d928db15d53805d9b728b440079756081961c536.zip
Implement RFC 2: Initial integration of "GDAL SRS barn" work
This work mostly consists of: - a C++ implementation of the ISO-19111:2018 / OGC Topic 2 "Referencing by coordinates" classes to represent Datums, Coordinate systems, CRSs (Coordinate Reference Systems) and Coordinate Operations. - methods to convert between this C++ modeling and WKT1, WKT2 and PROJ string representations of those objects - management and query of a SQLite3 database of CRS and Coordinate Operation definition - a C API binding part of those capabilities This is all-in-one squashed commit of the work of https://github.com/OSGeo/proj.4/pull/1040
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r--data/CMakeLists.txt28
1 files changed, 26 insertions, 2 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 82927b8b..d7d1486f 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -39,12 +39,36 @@ if(CONVERT_DATA)
endif(BUILD_NAD2BIN)
endif(CONVERT_DATA)
+set(ALL_SQL_IN "${CMAKE_CURRENT_SOURCE_DIR}/all.sql.in")
+set(PROJ_DB "${CMAKE_CURRENT_SOURCE_DIR}/proj.db")
+include(sql_filelist.cmake)
+
+add_custom_command(OUTPUT ${ALL_SQL_IN}
+ COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_SOURCE_DIR}/generate_all_sql_in.cmake"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ DEPENDS ${SQL_FILES}
+ COMMENT "Generating all.sql.in"
+ VERBATIM
+)
+
+add_custom_target(generate_all_sql_in ALL DEPENDS ${ALL_SQL_IN})
+
+add_custom_command(OUTPUT ${PROJ_DB}
+ COMMAND ${CMAKE_COMMAND} -E remove -f ${PROJ_DB}
+ COMMAND ${EXE_SQLITE3} -init ${ALL_SQL_IN} ${PROJ_DB} .quit
+ # note: we didn't port yet the foreign_key_check done in Makefile.am
+ DEPENDS generate_all_sql_in ${ALL_SQL_IN}
+ COMMENT "Generating proj.db"
+ VERBATIM
+)
+
+add_custom_target(generate_proj_db ALL DEPENDS ${PROJ_DB})
#
#install
#
set(ALL_DATA_FILE ${PROJ_DICTIONARY}
${GRIDSHIFT_FILES}
- ${GEOID_FILES})
+ ${GEOID_FILES} "proj.db")
install(FILES ${ALL_DATA_FILE}
- DESTINATION ${DATADIR})
+ DESTINATION ${DATADIR})