Revision: 77403
          http://sourceforge.net/p/brlcad/code/77403
Author:   starseeker
Date:     2020-10-10 15:54:40 +0000 (Sat, 10 Oct 2020)
Log Message:
-----------
Set include dirs and position headers so the gdal plugin builds.

Modified Paths:
--------------
    brlcad/branches/thirdparty_rework/src/superbuild/gdal/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/superbuild/gdal.cmake

Modified: brlcad/branches/thirdparty_rework/src/superbuild/gdal/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/gdal/CMakeLists.txt        
2020-10-10 15:47:19 UTC (rev 77402)
+++ brlcad/branches/thirdparty_rework/src/superbuild/gdal/CMakeLists.txt        
2020-10-10 15:54:40 UTC (rev 77403)
@@ -328,6 +328,8 @@
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different 
${CMAKE_CURRENT_BINARY_DIR}/cpl_config.h.tmp 
${CMAKE_CURRENT_BINARY_DIR}/cpl_config.h)
 execute_process(COMMAND ${CMAKE_COMMAND} -E remove 
${CMAKE_CURRENT_BINARY_DIR}/cpl_config.h.tmp)
 
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cpl_config.h DESTINATION 
include/gdal)
+
 add_subdirectory(port)
 add_subdirectory(gcore)
 add_subdirectory(alg)

Modified: brlcad/branches/thirdparty_rework/src/superbuild/gdal.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/gdal.cmake 2020-10-10 
15:47:19 UTC (rev 77402)
+++ brlcad/branches/thirdparty_rework/src/superbuild/gdal.cmake 2020-10-10 
15:54:40 UTC (rev 77403)
@@ -152,9 +152,28 @@
     vertcs.override.csv
     )
 
+  ExternalProject_ByProducts(gdal GDAL_BLD ${GDAL_INSTDIR} include/gdal 
${INCLUDE_DIR}/gdal
+    cpl_config.h
+    )
+
+  set(GDAL_LIBRARY gdal CACHE STRING "Building bundled gdal" FORCE)
   set(GDAL_LIBRARIES gdal CACHE STRING "Building bundled gdal" FORCE)
-  set(GDAL_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}/gdal" 
CACHE STRING "Directory containing GDAL headers." FORCE)
 
+  # TODO - to make this work, need to add install logic to GDAL build to 
position the headers in the right directories,
+  # and more ByProducts functions to copy them to the build dir...
+  set(GDAL_INCLUDE_DIR
+    "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}/gdal"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/port"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/gcore"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/alg"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/ogr"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/ogr/ogrsf_frmts"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/gnm"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/apps"
+    "${BRLCAD_SOURCE_DIR}/src/superbuild/gdal/frmts/vrt"
+    CACHE STRING "Directories containing GDAL headers." FORCE)
+  set(GDAL_INCLUDE_DIRS "${GDAL_INCLUDE_DIR}" CACHE STRING "Directories 
containing GDAL headers." FORCE)
+
   SetTargetFolder(GDAL_BLD "Third Party Libraries")
   SetTargetFolder(gdal "Third Party Libraries")
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to