DXF: initial libdxfrw import.

We had to fork libdxfrw since the upstream doesn't have a git
repository, a CMake buildsystem, and is quite buggy.

libdxfrw is also used in LibreCAD, but they just vendored
their version.
pull/4/head
whitequark 2015-11-03 22:05:20 +03:00
parent a71d5894aa
commit 20a041e0ef
4 changed files with 9 additions and 1 deletions

3
.gitmodules vendored
View File

@ -8,3 +8,6 @@
[submodule "extlib/libfreetype"] [submodule "extlib/libfreetype"]
path = extlib/libfreetype path = extlib/libfreetype
url = http://git.sv.nongnu.org/r/freetype/freetype2.git url = http://git.sv.nongnu.org/r/freetype/freetype2.git
[submodule "extlib/libdxfrw"]
path = extlib/libdxfrw
url = https://github.com/whitequark/libdxfrw.git

View File

@ -72,6 +72,9 @@ CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
message(STATUS "Using in-tree libdxfrw")
add_subdirectory(extlib/libdxfrw)
if(WIN32) if(WIN32)
# We don't want any of the subprojects to install anything. # We don't want any of the subprojects to install anything.
# We don't actually install anything on Windows (so overriding # We don't actually install anything on Windows (so overriding
@ -103,9 +106,9 @@ if(WIN32)
if(NOT ZLIB_FOUND) if(NOT ZLIB_FOUND)
message(STATUS "Using in-tree zlib") message(STATUS "Using in-tree zlib")
add_subdirectory(extlib/zlib) add_subdirectory(extlib/zlib)
message(STATUS "Using in-tree libpng")
set(ZLIB_LIBRARY set(ZLIB_LIBRARY
zlibstatic) zlibstatic)
set(ZLIB_INCLUDE_DIR set(ZLIB_INCLUDE_DIR

1
extlib/libdxfrw Submodule

@ -0,0 +1 @@
Subproject commit a6f7c0a9ff7b9dd847a1c673f7c414c3e10c4022

View File

@ -319,6 +319,7 @@ add_executable(solvespace WIN32 MACOSX_BUNDLE
${solvespace_SOURCES}) ${solvespace_SOURCES})
target_link_libraries(solvespace target_link_libraries(solvespace
dxfrw
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
${PNG_LIBRARIES} ${PNG_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}