cmake_minimum_required(VERSION 2.8)
project(CGII)

# Use shared libraries
set(BUILD_SHARED_LIBS 1)

# Set the default build type to be release
if (NOT CMAKE_BUILD_TYPE)
	set(CMAKE_BUILD_TYPE "Release")
endif()


# Needed cgv packages
find_package(cgv COMPONENTS gui render math
			 PATHS "${CMAKE_CURRENT_SOURCE_DIR}/../../../framework/cmake")

# Needed cgv libraries
find_package(cgv_gl)

# A viewer shall be created
find_package(cgv_viewer)

# Create the plugin
cgv_add_module(CGII
	../../src/Animation.cpp
	../../src/AtomicTransform.cpp
	../../src/Bone.cpp
	../../src/CGVDemo.cpp
	../../src/DataStore.cpp
	../../src/IHasBoundingBox.cpp
	../../src/IKViewer.cpp
	../../src/Mesh.cpp
	../../src/Skeleton.cpp
	../../src/SkeletonViewer.cpp
	../../src/SkinnedMeshViewer.cpp
	../../src/main.cpp
	../../src/debughelpers.cpp)

# Set include directories
include_directories(
	.
	${cgv_INCLUDE_DIRS}
	${cgv_gl_INCLUDE_DIRS}
)

target_link_libraries(CGII ${cgv_LIBRARIES} ${cgv_gl_LIBRARIES})

# Set the viewer working directory to point at the
# the source files


# Add a viewer
cgv_add_viewer(launch-exercise1
	CGII
	cg_fltk
	crg_stereo_view)


