Commit b2b58f8f authored by David Moxey's avatar David Moxey

Merge branch 'fix/cfi_cmake' into 'master'

fix/cfi_cmake_build See merge request !934
parents a6e89868 ff39217b
......@@ -12,24 +12,19 @@ IF(NEKTAR_USE_MESHGEN)
IF (NEKTAR_USE_CFI)
SET(TEST_ENV $ENV{CFI_DIR})
SET(TEST_ENV $ENV{FEGS_TOP})
IF(NOT DEFINED TEST_ENV)
MESSAGE(FATAL_ERROR "Cannot build with CFI without environment variable CFI_DIR set which points to cadfix1100fcs folder in the CFI installation")
MESSAGE(FATAL_ERROR "Cannot build with CFI without environment variable FEGS_TOP set which points to the top folder in the CFI installation")
ENDIF()
FIND_LIBRARY(CFI_LIBRARY_API NAMES cadfixapi PATHS $ENV{CFI_DIR}/lib64)
FIND_LIBRARY(CFI_LIBRARY_API NAMES cadfixapi PATHS $ENV{FEGS_LIB})
FIND_LIBRARY(CFI_LIBRARY_CXX NAMES oocfi_cxx.a PATHS $ENV{FEGS_TOP}/cadfixdev/oocfi/cxx)
IF(CFI_LIBRARY_API)
FIND_PATH (CFI_INCLUDE_DIR_HXX cadfixapi.hxx PATHS $ENV{CFI_DIR}/oocfi/cxx/cadfixapi)
FIND_PATH (CFI_INCLUDE_DIR cfiStandardFun.h PATHS $ENV{CFI_DIR}/include)
FIND_PATH (CFI_INCLUDE_DIR_HXX cadfixapi.hxx PATHS $ENV{FEGS_TOP}/cadfixdev/oocfi/cxx/cadfixapi)
FIND_PATH (CFI_INCLUDE_DIR cfiStandardFun.h PATHS $ENV{FEGS_TOP}/cadfixdev/include)
IF(CFI_INCLUDE_DIR)
SET(CFI_LIBRARIES_TMP cadfixapi extra)
FOREACH(CFI_LIBRARIES_TMP ${CFI_LIBRARIES_TMP})
LIST(APPEND CFI_LIBRARIES $ENV{CFI_DIR}/lib64/lib${CFI_LIBRARIES_TMP}.so)
ENDFOREACH()
MESSAGE(STATUS "cfi libraries: ${CFI_LIBRARIES}")
MESSAGE(STATUS "cfi libraries: ${CFI_LIBRARY_API}")
INCLUDE_DIRECTORIES(NekMeshUtils ${CFI_INCLUDE_DIR_HXX})
INCLUDE_DIRECTORIES(NekMeshUtils ${CFI_INCLUDE_DIR})
......
......@@ -132,11 +132,12 @@ IF(NEKTAR_USE_MESHGEN)
ADD_DEPENDENCIES(NekMeshUtils oce-0.17 tetgen-1.5 triangle-1.6)
IF(NEKTAR_USE_CFI)
TARGET_LINK_LIBRARIES(NekMeshUtils LINK_PRIVATE ${CFI_LIBRARIES})
TARGET_LINK_LIBRARIES(NekMeshUtils LINK_PRIVATE ${CFI_LIBRARY_API})
TARGET_LINK_LIBRARIES(NekMeshUtils LINK_PRIVATE ${CFI_LIBRARY_CXX})
ENDIF()
ENDIF()
INSTALL(DIRECTORY ./
DESTINATION ${NEKTAR_INCLUDE_DIR}/NekMeshUtils
COMPONENT dev
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
\ No newline at end of file
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
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