[Liblas-commits] hg: fix OpenInput and remove liblas_kernel as an
installable ent...
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Nov 22 13:16:33 EST 2010
changeset 5ac9800e2d83 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=5ac9800e2d83
summary: fix OpenInput and remove liblas_kernel as an installable entity. This wasn't working
diffstat:
apps/CMakeLists.txt | 21 +++++------------
apps/laskernel.hpp | 2 +-
apps/oci_util.cpp | 48 ++++++++++++++++++++-------------------
apps/oci_util.hpp | 2 +-
cmake/modules/BuildOSGeo4W.cmake | 1 -
5 files changed, 33 insertions(+), 41 deletions(-)
diffs (141 lines):
diff -r 82e6ece4d9fe -r 5ac9800e2d83 apps/CMakeLists.txt
--- a/apps/CMakeLists.txt Sat Nov 20 15:08:17 2010 -0600
+++ b/apps/CMakeLists.txt Mon Nov 22 12:16:15 2010 -0600
@@ -82,15 +82,6 @@
link_directories(${Boost_LIBRARY_DIRS})
-set (LASKERNEL_SOURCES laskernel.cpp)
-add_library(${LASKERNEL_LIB_NAME} SHARED ${LASKERNEL_SOURCES})
-target_link_libraries(${LASKERNEL_LIB_NAME}
- ${LIBLAS_LIB_NAME})
-
-install(TARGETS ${LASKERNEL_LIB_NAME}
- RUNTIME DESTINATION ${LIBLAS_BIN_DIR}
- LIBRARY DESTINATION ${LIBLAS_LIB_DIR}
- ARCHIVE DESTINATION ${LIBLAS_LIB_DIR})
# Build lasinfo
if(LASINFO_OLD)
@@ -107,13 +98,13 @@
endif()
if(LAS2LAS)
- add_executable(${LAS2LAS} las2las.cpp )
- target_link_libraries(${LAS2LAS} ${APPS_CPP_DEPENDENCIES} ${LASKERNEL_LIB_NAME})
+ add_executable(${LAS2LAS} las2las.cpp laskernel.cpp)
+ target_link_libraries(${LAS2LAS} ${APPS_CPP_DEPENDENCIES} )
endif()
if(LASINFO)
- add_executable(${LASINFO} lasinfo.cpp )
- target_link_libraries(${LASINFO} ${APPS_CPP_DEPENDENCIES} ${LASKERNEL_LIB_NAME} )
+ add_executable(${LASINFO} lasinfo.cpp laskernel.cpp )
+ target_link_libraries(${LASINFO} ${APPS_CPP_DEPENDENCIES} )
endif()
# Build las2txt
@@ -157,8 +148,8 @@
# Build las2oci
if(LAS2OCI)
- add_executable(${LAS2OCI} las2oci.cpp oci_wrapper.cpp kdx_util.cpp oci_util.cpp )
- target_link_libraries(${LAS2OCI} ${APPS_CPP_DEPENDENCIES} ${ORACLE_LIBRARY} ${LASKERNEL_LIB_NAME})
+ add_executable(${LAS2OCI} las2oci.cpp oci_wrapper.cpp kdx_util.cpp oci_util.cpp laskernel.cpp )
+ target_link_libraries(${LAS2OCI} ${APPS_CPP_DEPENDENCIES} ${ORACLE_LIBRARY} )
endif()
if(BIGFILE_TEST)
diff -r 82e6ece4d9fe -r 5ac9800e2d83 apps/laskernel.hpp
--- a/apps/laskernel.hpp Sat Nov 20 15:08:17 2010 -0600
+++ b/apps/laskernel.hpp Mon Nov 22 12:16:15 2010 -0600
@@ -93,7 +93,7 @@
#define compare_no_case(a,b,n) strncasecmp( (a), (b), (n) )
#endif
-// std::istream* OpenInput(std::string const& filename, bool bEnd);
+std::istream* OpenInput(std::string const& filename, bool bEnd);
LAS_DLL std::string TryReadFileData(std::string const& filename);
LAS_DLL std::vector<char> TryReadRawFileData(std::string const& filename);
LAS_DLL bool term_progress(std::ostream& os, double complete);
diff -r 82e6ece4d9fe -r 5ac9800e2d83 apps/oci_util.cpp
--- a/apps/oci_util.cpp Sat Nov 20 15:08:17 2010 -0600
+++ b/apps/oci_util.cpp Mon Nov 22 12:16:15 2010 -0600
@@ -1,29 +1,31 @@
#include "oci_util.hpp"
-std::istream* OpenInput(std::string const& filename, bool bEnd)
-{
- std::ios::openmode mode = std::ios::in | std::ios::binary;
- if (bEnd == true) {
- mode = mode | std::ios::ate;
- }
- std::istream* istrm;
- if (compare_no_case(filename.c_str(),"STDIN",5) == 0)
- {
- istrm = &std::cin;
- }
- else
- {
- istrm = new std::ifstream(filename.c_str(), mode);
- }
-
- if (!istrm->good())
- {
- delete istrm;
- throw std::runtime_error("Reading stream was not able to be created");
- }
- return istrm;
-}
+// std::istream* OpenInput(std::string const& filename, bool bEnd)
+// {
+// std::ios::openmode mode = std::ios::in | std::ios::binary;
+// if (bEnd == true) {
+// mode = mode | std::ios::ate;
+// }
+// std::istream* istrm;
+// if (compare_no_case(filename.c_str(),"STDIN",5) == 0)
+// {
+// istrm = &std::cin;
+// }
+// else
+// {
+// istrm = new std::ifstream(filename.c_str(), mode);
+// }
+//
+// if (!istrm->good())
+// {
+// delete istrm;
+// throw std::runtime_error("Reading stream was not able to be created");
+// }
+// return istrm;
+// }
+
+LAS_DLL std::istream* OpenInput(std::string const& filename, bool bEnd) ;
std::string ReadSQLData(std::string filename)
{
diff -r 82e6ece4d9fe -r 5ac9800e2d83 apps/oci_util.hpp
--- a/apps/oci_util.hpp Sat Nov 20 15:08:17 2010 -0600
+++ b/apps/oci_util.hpp Mon Nov 22 12:16:15 2010 -0600
@@ -33,7 +33,7 @@
std::string cloudColumnName);
LAS_DLL std::string to_upper(const std::string&);
LAS_DLL std::string ReadSQLData(std::string filename);
-LAS_DLL std::istream* OpenInput(std::string const& filename, bool bEnd) ;
+// LAS_DLL std::istream* OpenInput(std::string const& filename, bool bEnd) ;
#ifdef _WIN32
#define compare_no_case(a,b,n) _strnicmp( (a), (b), (n) )
diff -r 82e6ece4d9fe -r 5ac9800e2d83 cmake/modules/BuildOSGeo4W.cmake
--- a/cmake/modules/BuildOSGeo4W.cmake Sat Nov 20 15:08:17 2010 -0600
+++ b/cmake/modules/BuildOSGeo4W.cmake Mon Nov 22 12:16:15 2010 -0600
@@ -129,7 +129,6 @@
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas_c.dll ${OSGEO4W_BIN_DIR}/ )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas.dll ${OSGEO4W_BIN_DIR}/ )
-copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas_kernel.dll ${OSGEO4W_BIN_DIR}/ )
copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-start.bat.tmpl ${OSGEO4W_BIN_DIR}/liblas.bat.tmpl )
copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-init.bat ${OSGEO4W_ETC_INI_DIR}/liblas.bat )
More information about the Liblas-commits
mailing list