

# The headers, sources and Qt related stuff in this plugin
# ========================================================
SET(__PLUGIN_NAME___HDRS
	__PLUGIN_NAME__PluginFactory.h
	__PLUGIN_NAME__Plugin.h
	__PLUGIN_NAME__Widget.h
)

SET(__PLUGIN_NAME___SRCS
	__PLUGIN_NAME__PluginFactory.cxx
	__PLUGIN_NAME__Plugin.cxx
	__PLUGIN_NAME__Widget.cxx
)

SET(__PLUGIN_NAME___MOC_HDRS 	
	__PLUGIN_NAME__PluginFactory.h
	__PLUGIN_NAME__Plugin.h
	__PLUGIN_NAME__Widget.h
)

SET(__PLUGIN_NAME___UIS
	__PLUGIN_NAME__Widget.ui
)

QT4_WRAP_UI(UI_HDRS ${__PLUGIN_NAME___UIS})	
QT4_WRAP_CPP(MOC_SRCS ${__PLUGIN_NAME___MOC_HDRS})


# Set the library name for this plugin
# ====================================
SET(__PLUGIN_NAME___LIBRARY __PLUGIN_NAME__Plugin CACHE INTERNAL "")
SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)


# Project settings
# ================
SET(__PLUGIN_NAME___INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "")
INCLUDE_DIRECTORIES(${__PLUGIN_NAME___INCLUDE_DIRS} ${RITK_INCLUDE_DIRS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_SHARED)
ADD_LIBRARY(${__PLUGIN_NAME___LIBRARY} SHARED ${__PLUGIN_NAME___SRCS} ${__PLUGIN_NAME___HDRS} ${MOC_SRCS} ${UI_HDRS})
TARGET_LINK_LIBRARIES(${__PLUGIN_NAME___LIBRARY}

)
SET_TARGET_PROPERTIES(${__PLUGIN_NAME___LIBRARY} PROPERTIES DEBUG_POSTFIX "d")


# Module installation
# ===================
INSTALL(TARGETS ${__PLUGIN_NAME___LIBRARY} CONFIGURATIONS RELEASE
	RUNTIME DESTINATION ${RITK_BINARY_DIR}/release/plugins
	LIBRARY DESTINATION ${RITK_BINARY_DIR}/release/plugins
)
INSTALL(TARGETS ${__PLUGIN_NAME___LIBRARY} CONFIGURATIONS DEBUG
	RUNTIME DESTINATION ${RITK_BINARY_DIR}/debug/plugins 
	LIBRARY DESTINATION ${RITK_BINARY_DIR}/debug/plugins 
)
