Skip to content
Snippets Groups Projects
Commit ab14cb79 authored by TOMsworkspace's avatar TOMsworkspace
Browse files

add CMakeLists

parent c6b12c78
No related branches found
No related tags found
No related merge requests found
......@@ -34,3 +34,6 @@
build
build/
install
install/
cmake_minimum_required(VERSION 3.17)
cmake_minimum_required(VERSION 3.0)
project(dtk)
set(CMAKE_CXX_STANDARD 11)
include_directories(src)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install" CACHE STRING "Installation directory of library files")
#set(Boost_DIR "C:\\local\\boost_1_68_0")
#set(CGAL_DIR "C:\\dev\\CGAL-4.14.3")
#Installation directory of library files
set(DTK_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
find_package(Boost)
#include_directories(${Boost_DIRS})
#Installation directory for CMake configuration files
set(DTK_INSTALL_CMAKEDIR "${CMAKE_BINARY_DIR}")
find_package(CGAL)
#Installation directory for header files
set(DTK_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
add_executable(dtk
src/dtk.cpp
src/dtk.h
src/dtkArray.h
src/dtkAssert.cpp
src/dtkAssert.h
src/dtkCollisionDetectBasic.cpp
src/dtkCollisionDetectBasic.h
src/dtkCollisionDetectHierarchy.cpp
src/dtkCollisionDetectHierarchy.h
src/dtkCollisionDetectHierarchyKDOPS.cpp
src/dtkCollisionDetectHierarchyKDOPS.h
src/dtkCollisionDetectNode.cpp
src/dtkCollisionDetectNode.h
src/dtkCollisionDetectNodeKDOPS.cpp
src/dtkCollisionDetectNodeKDOPS.h
src/dtkCollisionDetectPrimitive.cpp
src/dtkCollisionDetectPrimitive.h
src/dtkCollisionDetectStage.cpp
src/dtkCollisionDetectStage.h
src/dtkConfig.h
src/dtkError.h
src/dtkErrorManager.cpp
src/dtkErrorManager.h
src/dtkExports.h
src/dtkGraphics.h
src/dtkGraphicsKernel.cpp
src/dtkGraphicsKernel.h
src/dtkGraphicsTools.h
src/dtkIDTypes.h
src/dtkImports.h
src/dtkInit.h
src/dtkIntersectTest.cpp
src/dtkIntersectTest.h
src/dtkIO.h
src/dtkMatrix.h
src/dtkMatrixAlgorithm.h
src/dtkMatrixOP.h
src/dtkPhysCore.cpp
src/dtkPhysCore.h
src/dtkPhysKnotPlanner.cpp
src/dtkPhysKnotPlanner.h
src/dtkPhysMassPoint.cpp
src/dtkPhysMassPoint.h
src/dtkPhysMassSpring.cpp
src/dtkPhysMassSpring.h
src/dtkPhysMassSpringCollisionResponse.cpp
src/dtkPhysMassSpringCollisionResponse.h
src/dtkPhysMassSpringThread.cpp
src/dtkPhysMassSpringThread.h
src/dtkPhysMassSpringThreadCollisionResponse.cpp
src/dtkPhysMassSpringThreadCollisionResponse.h
src/dtkPhysParticle.cpp
src/dtkPhysParticle.h
src/dtkPhysParticleSystem.cpp
src/dtkPhysParticleSystem.h
src/dtkPhysSpring.cpp
src/dtkPhysSpring.h
src/dtkPhysTetraMassSpring.cpp
src/dtkPhysTetraMassSpring.h
src/dtkPoints.h
src/dtkPointsReader.cpp
src/dtkPointsReader.h
src/dtkPointsVector.h
src/dtkPointsWriter.cpp
src/dtkPointsWriter.h
src/dtkProperty.h
src/dtkRandom.h
src/dtkSign.cpp
src/dtkSign.h
src/dtkStaticMeshEliminator.cpp
src/dtkStaticMeshEliminator.h
src/dtkStaticTetraMesh.cpp
src/dtkStaticTetraMesh.h
src/dtkStaticTetraMeshReader.cpp
src/dtkStaticTetraMeshReader.h
src/dtkStaticTetraMeshWriter.cpp
src/dtkStaticTetraMeshWriter.h
src/dtkStaticTriangleMesh.cpp
src/dtkStaticTriangleMesh.h
src/dtkStaticTriangleMeshReader.cpp
src/dtkStaticTriangleMeshReader.h
src/dtkStaticTriangleMeshWriter.cpp
src/dtkStaticTriangleMeshWriter.h
src/dtkTime.h
src/dtkTx.h
src/dtkTxIO.h
src/dtkTxOP.h
src/dtkUtility.h)
if("${DTK_INSTALL_LIBDIR}" STREQUAL "")
set(DTK_INSTALL_LIBDIR "lib")
endif()
target_link_libraries(dtk CGAL::CGAL )
if("${DTK_INSTALL_CMAKEDIR}" STREQUAL "")
set(DTK_INSTALL_CMAKEDIR "bin")
endif()
if("${DTK_INSTALL_INCLUDEDIR}" STREQUAL "")
set(DTK_INSTALL_INCLUDEDIR "include")
endif()
set(DTK_INSTALL_INCLUDEDIR "include")
message("DTK_INSTALL_LIBDIR : ${DTK_INSTALL_LIBDIR}")
message("DTK_INSTALL_INCLUDEDIR : ${DTK_INSTALL_INCLUDEDIR}")
message("DTK_INSTALL_CMAKEDIR: ${DTK_INSTALL_CMAKEDIR}")
add_subdirectory(src)
# dtk
deformable toolkit used for deforamable physical simulation
## How to build
dtk is build by CMake. so you can build easily.
### build with CMake GUI
### build with CLI
find_package(CGAL)
aux_source_directory(. dir_source)
file(GLOB dir_headers *.h)
#link
add_library(dtk ${dir_source})
target_link_libraries(dtk CGAL::CGAL)
install(
TARGETS dtk
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
)
#install
install(TARGETS dtk DESTINATION ${DTK_INSTALL_LIBDIR})
install(FILES ${dir_headers} DESTINATION ${DTK_INSTALL_INCLUDEDIR})
\ No newline at end of file
......@@ -3,7 +3,7 @@
#include "dtkConfig.h"
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include "CGAL/Exact_predicates_inexact_constructions_kernel.h"
#include <CGAL/basic.h>
#include <CGAL/Polyhedron_3.h>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment