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 #Setup the CMake module paths
list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@") list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@;@SMTK_VTK_MODULE_DIR@")
set(smtk_module_dir "@SMTK_MODULE_DIR@/Modules") set(smtk_module_dir "@SMTK_VTK_MODULE_DIR@/Modules")
if(IS_DIRECTORY "${smtk_module_dir}") if(IS_DIRECTORY "${smtk_module_dir}")
list(APPEND CMAKE_MODULE_PATH "${smtk_module_dir}") list(APPEND CMAKE_MODULE_PATH "${smtk_module_dir}")
file(GLOB config_files RELATIVE "${smtk_module_dir}" "${smtk_module_dir}/*.cmake") file(GLOB config_files RELATIVE "${smtk_module_dir}" "${smtk_module_dir}/*.cmake")
......
...@@ -459,7 +459,7 @@ install( ...@@ -459,7 +459,7 @@ install(
FILE SMTKTargets.cmake FILE SMTKTargets.cmake
) )
export(PACKAGE SMTK) export(EXPORT SMTK FILE "${PROJECT_BINARY_DIR}/SMTKTargets.cmake")
################################################################################ ################################################################################
# Create a build directory package configuration file # Create a build directory package configuration file
...@@ -470,7 +470,8 @@ export(PACKAGE SMTK) ...@@ -470,7 +470,8 @@ export(PACKAGE SMTK)
# #
# Required to happen before we include the docs directory # Required to happen before we include the docs directory
set(MOAB_ROOT_DIR "${MOAB_ROOT_DIR}") 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}") set(SMTK_CONFIG_DIR "${PROJECT_BINARY_DIR}")
configure_file( configure_file(
${PROJECT_SOURCE_DIR}/CMake/SMTKConfig.cmake.in ${PROJECT_SOURCE_DIR}/CMake/SMTKConfig.cmake.in
...@@ -483,6 +484,7 @@ configure_file( ...@@ -483,6 +484,7 @@ configure_file(
# Setup the config file for exports that stores what other thirdparty # Setup the config file for exports that stores what other thirdparty
# packages we need to search for ( MOAB, Remus, etc ) for when using the # packages we need to search for ( MOAB, Remus, etc ) for when using the
# install version of smtk # install version of smtk
set(SMTK_VTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}") set(SMTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_CONFIG_DIR "\${CMAKE_CURRENT_LIST_DIR}") set(SMTK_CONFIG_DIR "\${CMAKE_CURRENT_LIST_DIR}")
configure_file( configure_file(
......
Supports Markdown
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