Required changed resolved

This commit is contained in:
doinachiroiu 2020-09-24 09:40:30 +00:00
parent 2b8a1be547
commit a84fbbac62
2 changed files with 16 additions and 12 deletions

View File

@ -22,7 +22,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
find_package(PNG REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(libpcre REQUIRED IMPORTED_TARGET libpcre)
#pkg_check_modules(libproj REQUIRED IMPORTED_TARGET libproj)
pkg_check_modules(proj REQUIRED IMPORTED_TARGET proj)
set(SAPI_ROOT "${PROJECT_SOURCE_DIR}/../.." CACHE PATH "Path to the Sandboxed API source tree")
# cmake .. -G Ninja -DSAPI_ROOT=$HOME/sapi_root
@ -40,17 +40,15 @@ set_property(TARGET libgdal PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_D
target_link_libraries(libgdal INTERFACE
crypto expat jpeg
PkgConfig::libpcre
/usr/lib/libproj.so
PkgConfig::proj
sqlite3 tiff z pthread m rt dl curl
PNG::PNG)
add_sapi_library(gdal_sapi
FUNCTIONS GDALOpen GDALAllRegister GDALGetDatasetDriver
GDALGetDriverShortName GDALGetDriverLongName GDALGetRasterXSize
GDALGetRasterYSize GDALGetRasterCount GDALGetProjectionRef
GDALOpenEx GDALGetGeoTransform GDALGetRasterBand GDALGetBlockSize
GDALGetRasterMinimum GDALGetRasterMaximum GDALGetRasterBandXSize
GDALGetRasterBandYSize GDALRasterIO
GDALGetDriverShortName GDALGetDriverLongName
GDALGetGeoTransform GDALGetRasterBand GDALGetBlockSize
GDALGetRasterBandXSize GDALGetRasterBandYSize GDALRasterIO
INPUTS "/usr/include/gdal/gdal.h"
LIBRARY libgdal

View File

@ -21,6 +21,12 @@ PCRE: `sudo apt-get install libpcre3 libpcre3-dev`
PROJ: `sudo apt-get install libproj-dev`
OBS! You may need to set `export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib`.
It is required for libproj.so to be found into
/usr/local/lib/. You can also fix this by typing `locate libproj.so`
which will give you <the_absolute_path_of_libproj.so> and then
`cp <the_absolute_path_of_libproj.so> /usr/local/lib/`.
### Initializing GDAL submodule:
`git submodule add https://github.com/OSGeo/gdal/tree/master/gdal`
@ -33,7 +39,7 @@ GNUmakefile from gdal/gdal can handle building the static library.
`cp gdal/gdal/libgdal.a lib/`
OBS: The file is huge! It may take a while.
OBS! The file is huge! It may take a while.
### For testing:
`mkdir build && cd build`