Commit ac0f1136 authored by Michael Turner's avatar Michael Turner

fixed cmake

parent e2373b72
SET(OCC_DIR "" CACHE FILEPATH "Path to OpenCascade directory")
FIND_LIBRARY(OCC_LIB
NAMES PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d TKXSBase TKPShape TKTopAlgo
PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lPTKernel NAMES PTKernel PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKernel NAMES TKernel PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKMath NAMES TKMath PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKBRep NAMES TKBRep PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKIGES NAMES TKIGES PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKSTEP NAMES TKSTEP PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKSTEPAttr NAMES TKSTEPAttr PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKSTEP209 NAMES TKSTEP209 PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKSTEPBase NAMES TKSTEPBase PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKShapeSchema NAMES TKShapeSchema PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKGeomBase NAMES TKGeomBase PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKGeomAlgo NAMES TKGeomAlgo PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKG3d NAMES TKG3d PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKG2d NAMES TKG2d PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKXSBase NAMES TKXSBase PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKPShape NAMES TKPShape PATHS ${OCC_DIR}/lib)
FIND_LIBRARY(lTKTopAlgo NAMES TKTopAlgo PATHS ${OCC_DIR}/lib)
SET(OOC_FOUND FALSE)
IF(OCC_LIB)
SET(OCC_FOUND TRUE)
MARK_AS_ADVANCED(OCC_LIB)
ENDIF(OCC_LIB)
IF(lPTKernel)
SET(OCC_FOUND TRUE)
SET(OCC_LIBS ${lPTKernel} ${lTKernel} ${lTKMath} ${lTKBRep} ${lTKIGES} ${lTKSTEP} ${lTKSTEPAttr} ${lTKSTEP209} ${lTKSTEPBase} ${lTKShapeSchema} ${lTKGeomBase} ${lTKGeomAlgo} ${lTKG3d} ${lTKG2d} ${lTKXSBase} ${lTKPShape} ${lTKTopAlgo})
ENDIF(lPTKernel)
IF(OCC_FOUND)
MESSAGE(STATUS "Found opencascade: ${OCC_LIB}")
SET(OCC_INC_DIR ${OCC_DIR}/inc CACHE FILEPATH "OpenCascade include directory.")
MARK_AS_ADVANCED(OCC_PATH)
MARK_AS_ADVANCED(OCC_INC_DIR)
MESSAGE(STATUS "Found opencascade: ${OCC_LIBS}")
SET(OCC_INCLUDE_DIR ${OCC_DIR}/inc CACHE FILEPATH "OpenCascade include directory.")
MARK_AS_ADVANCED(OCC_PATH)
ELSE(OCC_FOUND)
MESSAGE(FATAL_ERROR "could not find opencascade")
ENDIF(OCC_FOUND)
MESSAGE(FATAL_ERROR "could not find opencascade")
ENDIF(OCC_FOUND)
\ No newline at end of file
......@@ -2,5 +2,5 @@ OPTION(NEKTAR_USE_OCC "Use opencascade for geometry interface." OFF)
IF(NEKTAR_USE_OCC)
INCLUDE(FindOCC)
INCLUDE_DIRECTORIES(${OCC_INC_DIR})
INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR})
ENDIF(NEKTAR_USE_OCC)
\ No newline at end of file
......@@ -469,7 +469,14 @@ IF( NEKTAR_USE_PETSC )
ENDIF( NEKTAR_USE_PETSC )
IF(NEKTAR_USE_OCC)
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${OCC_LIB})
SET(OCC_DEF LIN
LININTEL
HAVE_WOK_CONFIG_H
HAVE_CONFIG_H
CSFDB
)
SET_TARGET_PROPERTIES(LibUtilities PROPERTIES COMPILE_DEFINITIONS "${OCC_DEF}")
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${OCC_LIBS})
ENDIF(NEKTAR_USE_OCC)
INSTALL(FILES ${ExpressionTemplates} DESTINATION ${NEKTAR_INCLUDE_DIR}/ExpressionTemplates COMPONENT dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment