Commit 97e252c0 authored by Alexis Girault's avatar Alexis Girault
Browse files

STYLE: rearrange library CMakeLists.txt

Also merge Utility within Core.
parent 7dffdcbc
......@@ -3,15 +3,8 @@
#-----------------------------------------------------------------------------
include(imstkAddLibrary)
imstk_add_library( Core
H_FILES
imstkMath.h
imstkColor.h
imstkModule.h
CPP_FILES
imstkColor.cpp
imstkModule.cpp
LIBRARIES
Utilities
DEPENDS
g3log
)
#-----------------------------------------------------------------------------
......
......@@ -3,31 +3,7 @@
#-----------------------------------------------------------------------------
include(imstkAddLibrary)
imstk_add_library( Geometry
H_FILES
imstkGeometry.h
imstkPlane.h
imstkSphere.h
imstkCube.h
imstkMesh.h
imstkSurfaceMesh.h
imstkVolumetricMesh.h
imstkTetrahedralMesh.h
imstkHexahedralMesh.h
imstkGeometryMap.h
imstkIsometricMap.h
CPP_FILES
imstkGeometry.cpp
imstkPlane.cpp
imstkSphere.cpp
imstkCube.cpp
imstkMesh.cpp
imstkSurfaceMesh.cpp
imstkVolumetricMesh.cpp
imstkTetrahedralMesh.cpp
imstkHexahedralMesh.cpp
imstkGeometryMap.cpp
imstkIsometricMap.cpp
LIBRARIES
DEPENDS
Core
VegaFEM::volumetricMesh
)
......
......@@ -3,21 +3,7 @@
#-----------------------------------------------------------------------------
include(imstkAddLibrary)
imstk_add_library( Rendering
H_FILES
imstkViewer.h
imstkRenderer.h
imstkRenderDelegate.h
imstkPlaneRenderDelegate.h
imstkSphereRenderDelegate.h
imstkCubeRenderDelegate.h
CPP_FILES
imstkViewer.cpp
imstkRenderer.cpp
imstkRenderDelegate.cpp
imstkPlaneRenderDelegate.cpp
imstkSphereRenderDelegate.cpp
imstkCubeRenderDelegate.cpp
LIBRARIES
DEPENDS
${VTK_LIBRARIES}
Scene
)
......
......@@ -3,17 +3,7 @@
#-----------------------------------------------------------------------------
include(imstkAddLibrary)
imstk_add_library( Scene
H_FILES
imstkScene.h
imstkLight.h
imstkCamera.h
imstkSceneObject.h
CPP_FILES
imstkScene.cpp
imstkLight.cpp
imstkCamera.cpp
imstkSceneObject.cpp
LIBRARIES
DEPENDS
Core
Geometry
)
......
......@@ -3,12 +3,7 @@
#-----------------------------------------------------------------------------
include(imstkAddLibrary)
imstk_add_library( SimulationManager
H_FILES
imstkSimulationManager.h
CPP_FILES
imstkSimulationManager.cpp
LIBRARIES
Scene
DEPENDS
Rendering
)
......
#-----------------------------------------------------------------------------
# Create target
#-----------------------------------------------------------------------------
include(imstkAddLibrary)
imstk_add_library( Utilities
H_FILES
imstkLogUtility.h
CPP_FILES
imstkLogUtility.cpp
LIBRARIES
g3log
)
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
if( iMSTK_BUILD_TESTING )
add_subdirectory( Testing )
endif()
......@@ -2,7 +2,7 @@ function(imstk_add_library target)
set(options VERBOSE)
set(oneValueArgs)
set(multiValueArgs H_FILES CPP_FILES LIBRARIES)
set(multiValueArgs H_FILES CPP_FILES DEPENDS)
include(CMakeParseArguments)
cmake_parse_arguments(target "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
......@@ -17,6 +17,12 @@ function(imstk_add_library target)
endforeach()
endif()
#-----------------------------------------------------------------------------
# Create target (library)
#-----------------------------------------------------------------------------
file(GLOB target_H_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
file(GLOB target_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
#-----------------------------------------------------------------------------
# Create target (library)
#-----------------------------------------------------------------------------
......@@ -29,7 +35,7 @@ function(imstk_add_library target)
# Link libraries to current target
#-----------------------------------------------------------------------------
target_link_libraries( ${target}
${target_LIBRARIES}
${target_DEPENDS}
)
#-----------------------------------------------------------------------------
......
......@@ -121,7 +121,6 @@ include( ${VTK_USE_FILE} )
#--------------------------------------------------------------------------
# Add Source code subdirectories
#--------------------------------------------------------------------------
add_subdirectory(Base/Utilities)
add_subdirectory(Base/Core)
add_subdirectory(Base/Geometry)
add_subdirectory(Base/Scene)
......
Supports Markdown
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