cmake_minimum_required(VERSION 2.8)
project(sitplus)

set(sitplus_SRCS
	sitplus_main.cpp
	sitplus_main_window.h
	sitplus_main_window.cpp
	activitymanager.h
	activitymanager.cpp
	activityloader.h
	activityloader.cpp
	about.h
	about.cpp
	sitplus.rc
)

if (NOT ENABLE_WXWIDGETS)
	message (FATAL_ERROR "Currently requires wxWidgets")
endif(NOT ENABLE_WXWIDGETS)
find_package(wxWidgets COMPONENTS core base html REQUIRED)

find_package(Boost COMPONENTS filesystem REQUIRED)

add_executable(sitplus WIN32 ${sitplus_SRCS})
target_link_libraries(sitplus spcore)
target_link_libraries(sitplus widgets_base)
target_link_libraries(sitplus sphost)
target_link_libraries(sitplus nvwa)
target_link_libraries(sitplus testcommon)
target_link_libraries(sitplus ${wxWidgets_LIBRARIES})

INSTALL (TARGETS sitplus RUNTIME DESTINATION ${BINDIR})

if (WIN32)
	if (MSVC)
		install_to_msvc_build_directory( "${EXECUTABLE_OUTPUT_PATH}" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28ud_html_vc_custom.dll")		
	endif(MSVC)
	install(FILES "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28ud_html_vc_custom.dll" DESTINATION "${BINDIR}" CONFIGURATIONS Debug)
	install(FILES "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28u_html_vc_custom.dll" DESTINATION "${BINDIR}" CONFIGURATIONS Release RelWithDebInfo)
endif(WIN32)