Changeset: fe0b5e0988cc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fe0b5e0988cc
Added Files:
        sql/backends/monet5/vaults/CMakeLists.txt
        sql/backends/monet5/vaults/bam/CMakeLists.txt
        sql/backends/monet5/vaults/fits/CMakeLists.txt
        sql/backends/monet5/vaults/lidar/CMakeLists.txt
        sql/backends/monet5/vaults/netcdf/CMakeLists.txt
        sql/backends/monet5/vaults/shp/CMakeLists.txt
Modified Files:
        CMakeLists.txt
        cmake/FindCfitsio.cmake
        sql/backends/monet5/CMakeLists.txt
Branch: cmake-fun
Log Message:

Compiles and installs data vaults.


diffs (217 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1610,7 +1610,9 @@ if(NOT ${WITH_SAMTOOLS} STREQUAL "NO")
        if(NOT SAMTOOLS_ERROR)
                set(CMAKE_REQUIRED_LIBRARIES 
"${CMAKE_REQUIRED_LIBRARIES}bam;m;pthread;z")
                check_symbol_exists("bam_header_read" "samtools/bam.h" 
HAVE_SAMTOOLS)
-               if(NOT HAVE_SAMTOOLS)
+               if(HAVE_SAMTOOLS)
+                       set(SAMTOOLS_LIBRARIES bam)
+               else()
                        set(SAMTOOLS_ERROR "bam library not found")
                endif()
        endif()
diff --git a/cmake/FindCfitsio.cmake b/cmake/FindCfitsio.cmake
--- a/cmake/FindCfitsio.cmake
+++ b/cmake/FindCfitsio.cmake
@@ -6,7 +6,7 @@
 # CFITSIO_FOUND        - True if cfitsio found.
 
 # Look for the header file.
-find_path(CFITSIO_INCLUDE_DIR NAMES cfitsio/fitsio.h)
+find_path(CFITSIO_INCLUDE_DIR NAMES fitsio.h)
 
 # Look for the library.
 find_library(CFITSIO_LIBRARIES NAMES cfitsio)
diff --git a/sql/backends/monet5/CMakeLists.txt 
b/sql/backends/monet5/CMakeLists.txt
--- a/sql/backends/monet5/CMakeLists.txt
+++ b/sql/backends/monet5/CMakeLists.txt
@@ -6,9 +6,9 @@
 # Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
 #]]
 
-#[[if(NOT WIN32)
+if(NOT WIN32)
        add_subdirectory(vaults)
-endif()#]]
+endif()
 add_subdirectory(UDF)
 add_subdirectory(generator)
 
diff --git a/sql/backends/monet5/vaults/CMakeLists.txt 
b/sql/backends/monet5/vaults/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/CMakeLists.txt
@@ -0,0 +1,23 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+if(HAVE_SAMTOOLS)
+       add_subdirectory(bam)
+endif()
+if(HAVE_FITS)
+       add_subdirectory(fits)
+endif()
+if(HAVE_LIDAR)
+       add_subdirectory(lidar)
+endif()
+if(HAVE_NETCDF)
+       add_subdirectory(netcdf)
+endif()
+if(HAVE_SHP)
+       add_subdirectory(shp)
+endif()
diff --git a/sql/backends/monet5/vaults/bam/CMakeLists.txt 
b/sql/backends/monet5/vaults/bam/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/bam/CMakeLists.txt
@@ -0,0 +1,31 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(.. ../.. ../../../../include ../../../../common 
../../../../storage ../../../../server
+                                       ../../../../../monetdb5/modules/atoms 
../../../../../monetdb5/modules/kernel
+                                       ../../../../../monetdb5/mal 
../../../../../monetdb5/modules/mal ../../../../../monetdb5/optimizer
+                                       ../../../../../common/stream 
../../../../../common/utils ../../../../../gdk
+                                       ../../../../../tools/merovingian 
../../../../../tools/merovingian/daemon ${SAMTOOLS_INCLUDE_DIR})
+
+# the bam library is also called bam, so cmake gets confused. Give another name
+add_library(bamm MODULE
+                       bam_loader.c bam_loader.h
+                       bam_wrapper.c bam_wrapper.h
+                       bam_db_interface.c bam_db_interface.h
+                       bam_globals.c bam_globals.h
+                       bam_lib.c bam_lib.h
+                       bam_export.c bam_export.h
+                       mykstring.h)
+target_link_libraries(bamm PRIVATE monetdb5 gdk ${SAMTOOLS_LIBRARIES})
+set_target_properties(bamm PROPERTIES OUTPUT_NAME _bam)
+target_compile_definitions(bamm PRIVATE LIBBAM)
+
+install(TARGETS bamm DESTINATION ${LIBDIR}/monetdb5)
+install(FILES bam.mal DESTINATION ${LIBDIR}/monetdb5)
+install(FILES 85_bam.mal DESTINATION ${LIBDIR}/monetdb5/autoload)
+install(FILES 85_bam.sql DESTINATION ${LIBDIR}/monetdb5/createdb)
diff --git a/sql/backends/monet5/vaults/fits/CMakeLists.txt 
b/sql/backends/monet5/vaults/fits/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/fits/CMakeLists.txt
@@ -0,0 +1,23 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(.. ../.. ../../../../include ../../../../common 
../../../../storage ../../../../server
+                                       ../../../../../monetdb5/modules/atoms 
../../../../../monetdb5/modules/kernel
+                                       ../../../../../monetdb5/mal 
../../../../../monetdb5/modules/mal ../../../../../monetdb5/optimizer
+                                       ../../../../../monetdb5/scheduler 
../../../../../common/stream ../../../../../common/utils
+                                       ../../../../../gdk 
${CFITSIO_INCLUDE_DIR})
+
+add_library(fits MODULE fits.c fits.h)
+target_link_libraries(fits PRIVATE monetdb5 gdk ${CFITSIO_LIBRARIES})
+set_target_properties(fits PROPERTIES OUTPUT_NAME _fits)
+target_compile_definitions(fits PRIVATE LIBFITS)
+
+install(TARGETS fits DESTINATION ${LIBDIR}/monetdb5)
+install(FILES fits.mal DESTINATION ${LIBDIR}/monetdb5)
+install(FILES 72_fits.mal DESTINATION ${LIBDIR}/monetdb5/autoload)
+install(FILES 72_fits.sql DESTINATION ${LIBDIR}/monetdb5/createdb)
diff --git a/sql/backends/monet5/vaults/lidar/CMakeLists.txt 
b/sql/backends/monet5/vaults/lidar/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/lidar/CMakeLists.txt
@@ -0,0 +1,23 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(.. ../.. ../../../../include ../../../../common 
../../../../storage ../../../../server
+                                       ../../../../../monetdb5/modules/atoms 
../../../../../monetdb5/modules/kernel
+                                       ../../../../../monetdb5/mal 
../../../../../monetdb5/modules/mal ../../../../../monetdb5/optimizer
+                                       ../../../../../monetdb5/scheduler 
../../../../../common/stream ../../../../../common/utils
+                                       ../../../../../gdk 
${LIBLAS_INCLUDE_DIR})
+
+add_library(lidar MODULE lidar.c lidar.h)
+target_link_libraries(lidar PRIVATE monetdb5 gdk ${LIBLAS_LIBRARIES})
+set_target_properties(lidar PROPERTIES OUTPUT_NAME _lidar)
+target_compile_definitions(lidar PRIVATE LIBLIDAR)
+
+install(TARGETS lidar DESTINATION ${LIBDIR}/monetdb5)
+install(FILES lidar.mal DESTINATION ${LIBDIR}/monetdb5)
+install(FILES 75_lidar.mal DESTINATION ${LIBDIR}/monetdb5/autoload)
+install(FILES 75_lidar.sql DESTINATION ${LIBDIR}/monetdb5/createdb)
diff --git a/sql/backends/monet5/vaults/netcdf/CMakeLists.txt 
b/sql/backends/monet5/vaults/netcdf/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/netcdf/CMakeLists.txt
@@ -0,0 +1,23 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(.. ../.. ../../../../include ../../../../common 
../../../../storage ../../../../server
+                                       ../../../../../monetdb5/modules/atoms 
../../../../../monetdb5/modules/kernel
+                                       ../../../../../monetdb5/mal 
../../../../../monetdb5/modules/mal ../../../../../monetdb5/optimizer
+                                       ../../../../../monetdb5/scheduler 
../../../../../common/stream ../../../../../common/utils
+                                       ../../../../../gdk 
${NETCDF_INCLUDE_DIR})
+
+add_library(netcdf MODULE netcdf.c netcdf_vault.h)
+target_link_libraries(netcdf PRIVATE monetdb5 gdk ${NETCDF_LIBRARIES})
+set_target_properties(netcdf PROPERTIES OUTPUT_NAME _netcdf)
+target_compile_definitions(netcdf PRIVATE LIBNCDF)
+
+install(TARGETS netcdf DESTINATION ${LIBDIR}/monetdb5)
+install(FILES netcdf.mal DESTINATION ${LIBDIR}/monetdb5)
+install(FILES 74_netcdf.mal DESTINATION ${LIBDIR}/monetdb5/autoload)
+install(FILES 74_netcdf.sql DESTINATION ${LIBDIR}/monetdb5/createdb)
diff --git a/sql/backends/monet5/vaults/shp/CMakeLists.txt 
b/sql/backends/monet5/vaults/shp/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/vaults/shp/CMakeLists.txt
@@ -0,0 +1,23 @@
+#[[
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
+#]]
+
+include_directories(.. ../.. ../../../../include ../../../../common 
../../../../storage ../../../../server
+                                       ../../../../../monetdb5/modules/atoms 
../../../../../monetdb5/modules/kernel
+                                       ../../../../../monetdb5/mal 
../../../../../monetdb5/modules/mal ../../../../../monetdb5/optimizer
+                                       ../../../../../monetdb5/scheduler 
../../../../../common/stream ../../../../../common/utils
+                                       ../../../../../gdk 
../../../../../geom/lib ../../../../../geom/monetdb5 ${GDAL_INCLUDE_DIR})
+
+add_library(shp MODULE shp.c shp.h)
+target_link_libraries(shp PRIVATE monetdb5 gdk ${GDAL_LIBRARIES})
+set_target_properties(shp PROPERTIES OUTPUT_NAME _shp)
+target_compile_definitions(shp PRIVATE LIBGTIFF)
+
+install(TARGETS shp DESTINATION ${LIBDIR}/monetdb5)
+install(FILES shp.mal DESTINATION ${LIBDIR}/monetdb5)
+install(FILES 75_shp.mal DESTINATION ${LIBDIR}/monetdb5/autoload)
+install(FILES 75_shp.sql DESTINATION ${LIBDIR}/monetdb5/createdb)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to