# This file is a part of the OpenSurgSim project.
# Copyright 2012-2013, SimQuest Solutions Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

include_directories(
	${OSG_INCLUDE_DIR}
	${OPENTHREADS_INCLUDE_DIR}
)

set(SURGSIM_BLOCKS_SOURCES
	DriveElementFromInputBehavior.cpp
	KeyboardTogglesComponentBehavior.cpp
	MassSpring1DRepresentation.cpp
	MassSpring2DRepresentation.cpp
	MassSpring3DRepresentation.cpp
	MassSpringNDRepresentationUtils.cpp
	PoseInterpolator.cpp
	SphereElement.cpp
	TransferPhysicsToGraphicsMeshBehavior.cpp
	TransferPhysicsToPointCloudBehavior.cpp
	VisualizeContactsBehavior.cpp
)

set(SURGSIM_BLOCKS_HEADERS
	DriveElementFromInputBehavior.h
	KeyboardTogglesComponentBehavior.h
	MassSpring1DRepresentation.h
	MassSpring2DRepresentation.h
	MassSpring3DRepresentation.h
	MassSpringNDRepresentationUtils.h
	PoseInterpolator.h
	SphereElement.h
	TransferPhysicsToGraphicsMeshBehavior.h
	TransferPhysicsToPointCloudBehavior.h
	VisualizeContactsBehavior.h
)

surgsim_add_library(
	SurgSimBlocks
	"${SURGSIM_BLOCKS_SOURCES}"
	"${SURGSIM_BLOCKS_HEADERS}"
	"SurgSim/Blocks"
)

SET(LIBS
	SurgSimFramework
	SurgSimPhysics
	${Boost_LIBRARIES}
)

target_link_libraries(SurgSimBlocks ${LIBS}
)

if(BUILD_TESTING)
	add_subdirectory(UnitTests)
endif()

# Put SurgSimBlocks into folder "Blocks"
set_target_properties(SurgSimBlocks PROPERTIES FOLDER "Blocks") 
