To get started:
- download DXFLib from Ribbonsoft
- create the following directories dxflib, dxflib\src, dxflib\build
- unpack the downloaded archive into dxflib\src
- DXFLib comes with support for the standard UNIX toolchain. You can use the following CMakeFiles:
- For the base directory
# build the dxflib project PROJECT(DXFLib) CMAKE_MINIMUM_REQUIRED(VERSION 2.4) IF(WIN32) SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE) SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release minumum size builds" FORCE) SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the compiler during release builds" FORCE) SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release with debug info builds" FORCE) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ENDIF(WIN32) # build the library ADD_SUBDIRECTORY(src) # build the test program ADD_SUBDIRECTORY(test)
- For the src directory
# build dxflib FILE(GLOB HEADERS *.h) SET(SRCS dl_dxf.cpp dl_writer_ascii.cpp ) ADD_LIBRARY(dxflib ${HEADERS} ${SRCS} ) SET_TARGET_PROPERTIES(dxflib PROPERTIES LINKER_LANGUAGE CXX)
- and for the test directory
# build the test program ADD_EXECUTABLE(main main.cpp test_creationclass.cpp) INCLUDE_DIRECTORIES( ../src ) ADD_DEPENDENCIES( main dxflib ) TARGET_LINK_LIBRARIES(main dxflib)
- Configure in CCMake and build
There are no comments on this page. [Add comment]