Commit afa4a7c0 authored by Robert Maynard's avatar Robert Maynard

smtk moab and smtk mesh now properly build when used together.

parent 8ea0c2c6
......@@ -43,6 +43,9 @@ function(smtk_add_header_test name dir_prefix)
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
${MOAB_INCLUDE_DIRS}
)
#also link against moab so we build properly
target_link_libraries(TestBuild_${name}
PRIVATE MOAB)
endfunction(smtk_add_header_test)
......
......@@ -113,6 +113,7 @@ if (SMTK_ENABLE_REMUS_SUPPORT)
option(SMTK_ENABLE_REMOTE_SESSION "Build a session that allows modeling in a remote process." ON)
endif()
option(SMTK_USE_SYSTEM_MOAB "Use the system-installed moab?" OFF)
option(SMTK_USE_SYSTEM_SPARSEHASH "Use the system-installed sparsehash?" OFF)
option(SMTK_HASH_STORAGE "Use sparsehash library for primary storage?" OFF)
set(SMTK_DATA_DIR "" CACHE PATH "Path to a directory of SMTK test data.")
......@@ -186,9 +187,15 @@ endif()
################################################################################
# Moab Related Settings
################################################################################
# Moab is required for building smtk::mesh, as it is the default storage
# format for meshes.
find_package(MOAB REQUIRED)
#if we are not using system moab we will build our own version through
#the thirdparty folder
if (SMTK_USE_SYSTEM_MOAB)
# Moab is required for building smtk::mesh, as it is the default storage
# format for meshes.
find_package(MOAB REQUIRED)
endif()
################################################################################
# Qt Related Settings
......
......@@ -50,8 +50,12 @@ target_link_libraries(smtkCore
LINK_PUBLIC cJSON MOAB
LINK_PRIVATE ${Boost_LIBRARIES})
target_include_directories(smtkCore
PRIVATE ${MOAB_INCLUDE_DIRS})
#when we are building moab itself the target has the proper include directory
#but when we import moab it
if(SMTK_USE_SYSTEM_MOAB)
target_include_directories(smtkCore
PRIVATE ${MOAB_INCLUDE_DIRS})
endif()
smtk_export_header(smtkCore CoreExports.h)
if (NOT BUILD_SHARED_LIBS AND SMTK_ENABLE_PYTHON_WRAPPING)
......
add_subdirectory(cJSON)
add_subdirectory(moab)
if (NOT SMTK_USE_SYSTEM_MOAB)
add_subdirectory(moab)
endif()
# Only use the local sparsehash when the system version is not requested.
if (NOT SMTK_USE_SYSTEM_SPARSEHASH)
add_subdirectory(sparsehash)
......
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