Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
551c95f0
Commit
551c95f0
authored
13 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
ENH: use standard Find module for LibLAS
parent
b1cf5526
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/FindLibLAS.cmake
+34
-0
34 additions, 0 deletions
CMake/FindLibLAS.cmake
CMake/ImportLibLAS.cmake
+25
-30
25 additions, 30 deletions
CMake/ImportLibLAS.cmake
Code/IO/CMakeLists.txt
+1
-9
1 addition, 9 deletions
Code/IO/CMakeLists.txt
with
60 additions
and
39 deletions
CMake/FindLibLAS.cmake
0 → 100644
+
34
−
0
View file @
551c95f0
# - Find LIBLAS
# Find the native LIBLAS includes and library
#
# LIBLAS_FOUND - True if LIBLAS found.
# LIBLAS_INCLUDE_DIRS - where to find tinyxml.h, etc.
# LIBLAS_LIBRARIES - List of libraries when using LIBLAS.
#
IF
(
LIBLAS_INCLUDE_DIR
)
# Already in cache, be silent
message
(
"silent"
)
SET
(
LIBLAS_FIND_QUIETLY TRUE
)
ENDIF
(
LIBLAS_INCLUDE_DIR
)
FIND_PATH
(
LIBLAS_INCLUDE_DIR liblas/capi/liblas.h
)
FIND_LIBRARY
(
LIBLAS_LIBRARY
NAMES liblas_c liblas
)
# handle the QUIETLY and REQUIRED arguments and set LIBLAS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
LIBLAS DEFAULT_MSG LIBLAS_INCLUDE_DIR LIBLAS_LIBRARY
)
MARK_AS_ADVANCED
(
LIBLAS_INCLUDE_DIR LIBLAS_LIBRARY
)
IF
(
LIBLAS_FOUND
)
SET
(
LIBLAS_INCLUDE_DIRS
${
LIBLAS_INCLUDE_DIR
}
)
SET
(
LIBLAS_LIBRARIES
${
LIBLAS_LIBRARY
}
)
ELSE
(
LIBLAS_FOUND
)
SET
(
LIBLAS_INCLUDE_DIRS
)
SET
(
LIBLAS_LIBRARIES
)
ENDIF
(
LIBLAS_FOUND
)
This diff is collapsed.
Click to expand it.
CMake/ImportLibLAS.cmake
+
25
−
30
View file @
551c95f0
MESSAGE
(
STATUS
"Importing LibLAS..."
)
MESSAGE
(
STATUS
"Importing LibLAS..."
)
# Use the liblas library (do not link on solaris)
OPTION
(
OTB_USE_LIBLAS
"Use liblas library to support Lidar data format."
ON
)
OPTION
(
OTB_USE_LIBLAS
"Use liblas library to support Lidar data format."
ON
)
MARK_AS_ADVANCED
(
OTB_USE_LIBLAS
)
MARK_AS_ADVANCED
(
OTB_USE_LIBLAS
)
IF
(
OTB_USE_LIBLAS
)
IF
(
OTB_USE_LIBLAS
)
FIND_PACKAGE
(
LibLAS
)
OPTION
(
OTB_USE_EXTERNAL_LIBLAS
"Use an outside build of LibLAS (Lidar data)."
OFF
)
MARK_AS_ADVANCED
(
OTB_USE_EXTERNAL_LIBLAS
)
IF
(
OTB_USE_EXTERNAL_LIBLAS
)
FIND_PATH
(
LIBLAS_INCLUDE_DIR NAMES liblas/capi/liblas.h PATHS
${
OSGEO4W_INCLUDE
}
)
IF
(
LIBLAS_INCLUDE_DIR
)
INCLUDE_DIRECTORIES
(
${
LIBLAS_INCLUDE_DIR
}
)
ENDIF
(
LIBLAS_INCLUDE_DIR
)
FIND_LIBRARY
(
LIBLAS_LIBRARY NAMES liblas_c liblas PATHS
${
OSGEO4W_LIB
}
)
IF
(
LIBLAS_LIBRARY
)
LINK_DIRECTORIES
(
${
LIBLAS_LIBRARY
}
)
ENDIF
(
LIBLAS_LIBRARY
)
ENDIF
(
OTB_USE_EXTERNAL_LIBLAS
)
IF
(
OTB_USE_EXTERNAL_LIBLAS
)
MESSAGE
(
STATUS
" Using LibLAS external version"
)
MESSAGE
(
STATUS
" LibLAS includes :
${
LIBLAS_INCLUDE_DIR
}
"
)
MESSAGE
(
STATUS
" LibLAS library :
${
LIBLAS_LIBRARY
}
"
)
ELSE
(
OTB_USE_EXTERNAL_LIBLAS
)
MESSAGE
(
STATUS
" Using LibLAS internal version"
)
ENDIF
(
OTB_USE_EXTERNAL_LIBLAS
)
ADD_DEFINITIONS
(
-DLAS_DISABLE_DLL
)
# Initialize option with what's found on the system
IF
(
LIBLAS_FOUND
)
OPTION
(
OTB_USE_EXTERNAL_LIBLAS
"Use external LIBLAS library."
ON
)
ELSE
(
LIBLAS_FOUND
)
OPTION
(
OTB_USE_EXTERNAL_LIBLAS
"Use external LIBLAS library."
OFF
)
ENDIF
(
LIBLAS_FOUND
)
MARK_AS_ADVANCED
(
OTB_USE_EXTERNAL_LIBLAS
)
IF
(
OTB_USE_EXTERNAL_LIBLAS
)
IF
(
LIBLAS_FOUND
)
MESSAGE
(
STATUS
"Using LibLAS external version"
)
ELSE
(
LIBLAS_FOUND
)
# Generate an error if no external liblas is available
MESSAGE
(
FATAL_ERROR
"LibLAS required but not found. "
"Either turn OTB_USE_EXTERNAL_LIBLAS to OFF to use the internal version, "
"or OTB_USE_LIBLAS to OFF to disable LAS support"
)
ENDIF
(
LIBLAS_FOUND
)
ELSE
(
OTB_USE_EXTERNAL_LIBLAS
)
MESSAGE
(
STATUS
"Using LibLAS internal version"
)
SET
(
LIBLAS_LIBRARIES otbliblas
)
ADD_DEFINITIONS
(
-DLAS_DISABLE_DLL
)
ENDIF
(
OTB_USE_EXTERNAL_LIBLAS
)
ENDIF
(
OTB_USE_LIBLAS
)
ELSE
(
OTB_USE_LIBLAS
)
MESSAGE
(
STATUS
" Disabling LibLAS support"
)
ENDIF
(
OTB_USE_LIBLAS
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Code/IO/CMakeLists.txt
+
1
−
9
View file @
551c95f0
...
@@ -39,15 +39,7 @@ ADD_LIBRARY(OTBIO ${OTBIO_SRCS})
...
@@ -39,15 +39,7 @@ ADD_LIBRARY(OTBIO ${OTBIO_SRCS})
# LINK_INTERFACE_LIBRARIES ""
# LINK_INTERFACE_LIBRARIES ""
# )
# )
TARGET_LINK_LIBRARIES
(
OTBIO
${
TIFF_LIBRARY
}
${
GEOTIFF_LIBRARY
}
${
GDAL_LIBRARY
}
${
OGR_LIBRARY
}
${
JPEG_LIBRARY
}
${
OPENTHREADS_LIBRARY
}
OTBCommon OTBBasicFilters OTBCurlAdapters
)
TARGET_LINK_LIBRARIES
(
OTBIO
${
TIFF_LIBRARY
}
${
GEOTIFF_LIBRARY
}
${
GDAL_LIBRARY
}
${
OGR_LIBRARY
}
${
JPEG_LIBRARY
}
${
OPENTHREADS_LIBRARY
}
OTBCommon OTBBasicFilters OTBCurlAdapters
)
TARGET_LINK_LIBRARIES
(
OTBIO ITKIO ITKCommon
${
LIBKML_LIBRARIES
}
${
TINYXML_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
OTBIO ITKIO ITKCommon
${
LIBKML_LIBRARIES
}
${
TINYXML_LIBRARIES
}
${
LIBLAS_LIBRARIES
}
)
IF
(
OTB_USE_LIBLAS
)
IF
(
OTB_USE_EXTERNAL_LIBLAS
)
TARGET_LINK_LIBRARIES
(
OTBIO
${
LIBLAS_LIBRARY
}
)
ELSE
(
OTB_USE_EXTERNAL_LIBLAS
)
TARGET_LINK_LIBRARIES
(
OTBIO otbliblas
)
ENDIF
(
OTB_USE_EXTERNAL_LIBLAS
)
ENDIF
(
OTB_USE_LIBLAS
)
IF
(
OTB_USE_JPEG2000
)
IF
(
OTB_USE_JPEG2000
)
TARGET_LINK_LIBRARIES
(
OTBIO otbopenjpeg
)
TARGET_LINK_LIBRARIES
(
OTBIO otbopenjpeg
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment