Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FEATURE] DWG import into geopackage using libdxfrw
  • Loading branch information
jef-n committed Dec 14, 2016
1 parent 159ad68 commit a85fe1f
Show file tree
Hide file tree
Showing 57 changed files with 90,204 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/app/CMakeLists.txt
@@ -1,3 +1,5 @@
ADD_SUBDIRECTORY(dwg/libdxfrw)

SET(QGIS_APP_SRCS
qgisapp.cpp
qgisappinterface.cpp
Expand Down Expand Up @@ -162,6 +164,9 @@ SET(QGIS_APP_SRCS
openstreetmap/qgsosmimportdialog.cpp
openstreetmap/qgsosmexportdialog.cpp

dwg/qgsdwgimportdialog.cpp
dwg/qgsdwgimporter.cpp

pluginmanager/qgspluginmanager.cpp
pluginmanager/qgspluginmanager_texts.cpp
pluginmanager/qgsapppluginmanagerinterface.cpp
Expand Down Expand Up @@ -330,6 +335,8 @@ SET (QGIS_APP_MOC_HDRS
openstreetmap/qgsosmimportdialog.h
openstreetmap/qgsosmexportdialog.h

dwg/qgsdwgimportdialog.h

pluginmanager/qgspluginmanager.h
pluginmanager/qgsapppluginmanagerinterface.h
pluginmanager/qgspluginsortfilterproxymodel.h
Expand Down Expand Up @@ -548,6 +555,8 @@ INCLUDE_DIRECTORIES(
../python
gps
openstreetmap
dwg
dwg/libdxfrw
)
INCLUDE_DIRECTORIES(SYSTEM
${SPATIALITE_INCLUDE_DIR}
Expand Down Expand Up @@ -581,7 +590,8 @@ ENDIF (ANDROID)
REMOVE_DEFINITIONS("-DAPP_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("\"-DAPP_EXPORT=${DLLEXPORT}\"")

# Putting IMAGE_RCC_SRCS into qgis_app lib is cousing problems when the lib is loaded (by plugin for example) in test unit (qgis_composerpicturetest).
# Putting IMAGE_RCC_SRCS into qgis_app lib is causing problems when the lib is
# loaded (by plugin for example) in test unit (qgis_composerpicturetest).
ADD_LIBRARY(qgis_app SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS})

TARGET_LINK_LIBRARIES(qgis_app
Expand All @@ -596,6 +606,7 @@ TARGET_LINK_LIBRARIES(qgis_app
qgis_core
qgis_gui
qgis_analysis
libdxfrw
)

IF (NOT ANDROID)
Expand Down
82 changes: 82 additions & 0 deletions src/app/dwg/libdxfrw/CMakeLists.txt
@@ -0,0 +1,82 @@
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/core
${Qt5Core_INCLUDE_DIRS}
)

ADD_LIBRARY(libdxfrw STATIC
drw_classes.cpp
drw_entities.cpp
drw_header.cpp
drw_objects.cpp
libdwgr.cpp
libdxfrw.cpp
intern/drw_dbg.cpp
intern/drw_textcodec.cpp
intern/dwgbuffer.cpp
intern/dwgreader.cpp
intern/dwgreader15.cpp
intern/dwgreader18.cpp
intern/dwgreader21.cpp
intern/dwgreader24.cpp
intern/dwgreader27.cpp
intern/dwgutil.cpp
intern/dxfreader.cpp
intern/dxfwriter.cpp
intern/rscodec.cpp
)
SET_PROPERTY(TARGET libdxfrw PROPERTY POSITION_INDEPENDENT_CODE ON)

IF(FALSE)
IF(DOXYGEN_FOUND)
ADD_CUSTOM_TARGET(doxygen-dxfrw ALL
COMMAND ${DOXYGEN_EXECUTABLE} libdxfrw.dox
drw_base.h
drw_classes.cpp
drw_classes.h
drw_entities.cpp
drw_entities.h
drw_header.cpp
drw_header.h
drw_interface.h
drw_objects.cpp
drw_objects.h
libdwgr.cpp
libdwgr.h
libdxfrw.cpp
libdxfrw.h
intern/drw_cptable932.h
intern/drw_cptable936.h
intern/drw_cptable949.h
intern/drw_cptable950.h
intern/drw_cptables.h
intern/drw_dbg.cpp
intern/drw_dbg.h
intern/drw_textcodec.cpp
intern/drw_textcodec.h
intern/dwgbuffer.cpp
intern/dwgbuffer.h
intern/dwgreader.cpp
intern/dwgreader.h
intern/dwgreader15.cpp
intern/dwgreader15.h
intern/dwgreader18.cpp
intern/dwgreader18.h
intern/dwgreader21.cpp
intern/dwgreader21.h
intern/dwgreader24.cpp
intern/dwgreader24.h
intern/dwgreader27.cpp
intern/dwgreader27.h
intern/dwgutil.cpp
intern/dwgutil.h
intern/dxfreader.cpp
intern/dxfreader.h
intern/dxfwriter.cpp
intern/dxfwriter.h
intern/rscodec.cpp
intern/rscodec.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS libdxfrw
COMMENT "Generating libdxfrw documentation" VERBATIM)
ENDIF(DOXYGEN_FOUND)
ENDIF(FALSE)

0 comments on commit a85fe1f

Please sign in to comment.