PROJECT (wxVTKSample)

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

#-----------------------------------------------------------------------------
# VTK
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

#-----------------------------------------------------------------------------
# wxWidgets
FIND_PACKAGE(wxWidgets COMPONENTS base core adv)
INCLUDE( ${wxWidgets_USE_FILE} )

#-----------------------------------------------------------------------------
SET (EXECUTABLE_OUTPUT_PATH ${wxVTKSample_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")
SET (LIBRARY_OUTPUT_PATH ${wxVTKSample_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)

INCLUDE_DIRECTORIES(${wxVTKSample_SOURCE_DIR}/src)

#-----------------------------------------------------------------------------
SET(SRCS_Sample
  Sample/Sample.cpp
  src/wxVTKRenderWindowInteractor.cxx
  )

SET(SRCS_SplitSample
  Sample/SplitSample.cpp
  src/wxVTKRenderWindowInteractor.cxx
  )

SET(SRCS_VTKNotebook
  Sample/wxVTKNotebook.cxx
  src/wxVTKRenderWindowInteractor.cxx
  )

LINK_LIBRARIES(
  ${VTK_LIBRARIES}
  ${wxWidgets_LIBRARIES}
  )

ADD_EXECUTABLE(wxSample WIN32 ${SRCS_Sample})
ADD_EXECUTABLE(wxSplitSample WIN32 ${SRCS_SplitSample})
ADD_EXECUTABLE(wxVTKNotebook WIN32 ${SRCS_VTKNotebook})

INSTALL(TARGETS
    wxSplitSample wxSample wxVTKNotebook
	RUNTIME DESTINATION bin
	BUNDLE DESTINATION bin
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib/static
)

