cmake_minimum_required(VERSION 2.6)
project(widgets_base)

set (SPWIDGETSBASE_MAJOR_VERSION 1)
set (SPWIDGETSBASE_RELEASE_VERSION 0)
set (SPWIDGETSBASE_EPOCH_VERSION 0)

set(widgets_base_SRCS
	${CUSTOM_INCLUDE_PATH}/widgets_base/containerpanel.h
	containerpanel.cpp	
	${CUSTOM_INCLUDE_PATH}/widgets_base/dialogcontainer.h
	dialogcontainer.cpp
	${CUSTOM_INCLUDE_PATH}/widgets_base/mdichildcontainer.h
	mdichildcontainer.cpp
	${CUSTOM_INCLUDE_PATH}/widgets_base/containerbook.h
	containerbook.cpp
	${CUSTOM_INCLUDE_PATH}/widgets_base/containercollapsible.h
	containercollapsible.cpp
	${CUSTOM_INCLUDE_PATH}/widgets_base/libimpexp_widgetsbase.h
)

#
# This library should always be shared because several
# plugings might use it.
#

add_library (widgets_base SHARED ${widgets_base_SRCS})
target_link_libraries(widgets_base nvwa)
target_link_libraries(widgets_base ${wxWidgets_LIBRARIES})


add_definitions(-DSPMAKING_DLL_SPWIDGETSBASE)
#add_definitions(-DSPUSING_DLL)

set_target_properties(widgets_base PROPERTIES 
	VERSION "${SPWIDGETSBASE_MAJOR_VERSION}.${SPWIDGETSBASE_RELEASE_VERSION}.${SPWIDGETSBASE_EPOCH_VERSION}"
	SOVERSION ${SPWIDGETSBASE_MAJOR_VERSION}
)

INSTALL (TARGETS widgets_base RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
