PROJECT(Blank_DefOrgViewerAdapter) FIND_PACKAGE(VTK REQUIRED) INCLUDE(${VTK_USE_FILE}) FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.") ENDIF(ITK_FOUND) # Get the user to specify the path to DefOrgs sources: FIND_PATH( DefOrgs-Source_PATH DefOrgs-Source "The DefOrgs source directory" ) FIND_PATH( DefOrgViewerTemplate-Source_PATH DefOrgViewerTemplate-Source "Directory where DefOrgViewerAdapterBaseTemplated.cxx can be found" ) # The name of our targets (executable or libraries) will simply be based # on the project name, with an extra prefix and suffix. SET(TARGET_BASE_NAME "Blank_DefOrgViewerAdapter") # We actually define a class in this example, and we want to be able to # use its callbacks from our user interface. To do so, we need to create # a library and wrap it automatically for the Tcl language. SET(LIB_NAME "${TARGET_BASE_NAME}") SET(LIB_SRCS "${TARGET_BASE_NAME}.cxx") INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} #DefOrg Source ${DefOrgs-Source_PATH}/sensory ${DefOrgs-Source_PATH}/sensory/abc ${DefOrgs-Source_PATH}/physical ${DefOrgs-Source_PATH}/physical/abc ${DefOrgs-Source_PATH}/behavioral ${DefOrgs-Source_PATH}/behavioral/abc ${DefOrgs-Source_PATH}/cognitive ${DefOrgs-Source_PATH}/cognitive/abc ${DefOrgs-Source_PATH}/include ${DefOrgs-Source_PATH}/organism ${DefOrgs-Source_PATH}/geometrical ${DefOrgs-Source_PATH}/geometrical/abc #${DefOrgViewerWithKW-Source_PATH} ${DefOrgViewerTemplate-Source_PATH} ) # Create the library ADD_LIBRARY(${LIB_NAME} SHARED ${LIB_TCL_SRCS} ${LIB_SRCS} "${DefOrgViewerTemplate-Source_PATH}/DefOrgViewerAdapterBaseTemplated.cxx" "${DefOrgViewerTemplate-Source_PATH}/DefOrgViewerAdapterBase.cxx") TARGET_LINK_LIBRARIES(${LIB_NAME} ${ITK_LIBRARIES} vtkRendering) IF(NOT KWWidgets_SOURCE_DIR AND VTK_TCL_TK_COPY_SUPPORT_LIBRARY) IF(VTK_TCL_SUPPORT_LIBRARY_PATH AND VTK_TK_SUPPORT_LIBRARY_PATH) INCLUDE(${VTK_TCL_TK_MACROS_MODULE}) VTK_COPY_TCL_TK_SUPPORT_FILES_TO_DIR( ${VTK_TCL_SUPPORT_LIBRARY_PATH} ${VTK_TK_SUPPORT_LIBRARY_PATH} "${PROJECT_BINARY_DIR}/lib") ENDIF(VTK_TCL_SUPPORT_LIBRARY_PATH AND VTK_TK_SUPPORT_LIBRARY_PATH) ENDIF(NOT KWWidgets_SOURCE_DIR AND VTK_TCL_TK_COPY_SUPPORT_LIBRARY)