Commit 733bfa61 authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'allow_thirdparty_smtk_to_be_used_from_build_dir'

a147be42 SMTK will properly export its target file when a submodule of CMB.
b2d73a7c

 Teach smtk to properly locate module files from cmb thirdparty build dir.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Acked-by: default avatarYumin Yuan <yumin.yuan@kitware.com>
Merge-request: !17
parents 9571756a a147be42
#Setup the CMake module paths
list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@")
set(smtk_module_dir "@SMTK_MODULE_DIR@/Modules")
list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@;@SMTK_VTK_MODULE_DIR@")
set(smtk_module_dir "@SMTK_VTK_MODULE_DIR@/Modules")
if(IS_DIRECTORY "${smtk_module_dir}")
list(APPEND CMAKE_MODULE_PATH "${smtk_module_dir}")
file(GLOB config_files RELATIVE "${smtk_module_dir}" "${smtk_module_dir}/*.cmake")
......
......@@ -459,7 +459,7 @@ install(
FILE SMTKTargets.cmake
)
export(PACKAGE SMTK)
export(EXPORT SMTK FILE "${PROJECT_BINARY_DIR}/SMTKTargets.cmake")
################################################################################
# Create a build directory package configuration file
......@@ -470,7 +470,8 @@ export(PACKAGE SMTK)
#
# Required to happen before we include the docs directory
set(MOAB_ROOT_DIR "${MOAB_ROOT_DIR}")
set(SMTK_MODULE_DIR "${CMAKE_BINARY_DIR}/lib/cmake/SMTK")
set(SMTK_VTK_MODULE_DIR "${CMAKE_BINARY_DIR}/lib/cmake/SMTK")
set(SMTK_MODULE_DIR "${PROJECT_SOURCE_DIR}/CMake")
set(SMTK_CONFIG_DIR "${PROJECT_BINARY_DIR}")
configure_file(
${PROJECT_SOURCE_DIR}/CMake/SMTKConfig.cmake.in
......@@ -483,6 +484,7 @@ configure_file(
# Setup the config file for exports that stores what other thirdparty
# packages we need to search for ( MOAB, Remus, etc ) for when using the
# install version of smtk
set(SMTK_VTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_CONFIG_DIR "\${CMAKE_CURRENT_LIST_DIR}")
configure_file(
......
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