Commit ffd8b059 authored by jcfr's avatar jcfr
Browse files

BUG: Make sure CMake module path is update before any call to Find_package()

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15181 3bd1e089-480b-0410-8dfb-8563597acbee
parent 745d1e04
...@@ -40,6 +40,19 @@ INCLUDE(CMake/Slicer3PluginsMacros.cmake) ...@@ -40,6 +40,19 @@ INCLUDE(CMake/Slicer3PluginsMacros.cmake)
INCLUDE(CMake/SlicerMacroEmptyExternalProject.cmake) INCLUDE(CMake/SlicerMacroEmptyExternalProject.cmake)
INCLUDE(CMake/SlicerFunctionCheckCompilerFlags.cmake) INCLUDE(CMake/SlicerFunctionCheckCompilerFlags.cmake)
#-----------------------------------------------------------------------------
# Update CMake module path
#------------------------------------------------------------------------------
SET(CMAKE_MODULE_PATH
${VTK_CMAKE_DIR}
${Slicer_SOURCE_DIR}/CMake
${Slicer_BINARY_DIR}/CMake
${CMAKE_MODULE_PATH}
)
SET(Slicer_CMAKE_DIR "${Slicer_SOURCE_DIR}/CMake" CACHE INTERNAL "")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Platform check # Platform check
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -140,21 +153,6 @@ if(Slicer_USE_KWWIDGETS) ...@@ -140,21 +153,6 @@ if(Slicer_USE_KWWIDGETS)
MARK_AS_ADVANCED(Slicer_USE_PYTHON Slicer_BUILD_MODULES) MARK_AS_ADVANCED(Slicer_USE_PYTHON Slicer_BUILD_MODULES)
endif() endif()
#-----------------------------------------------------------------------------
# Update CMake module path
#------------------------------------------------------------------------------
# Make sure VTK_CMAKE_DIR is at the beginning so that VTK's FindTCL is
# used before CMake's FindTCL.
SET(CMAKE_MODULE_PATH
${VTK_CMAKE_DIR}
${Slicer_SOURCE_DIR}/CMake
${Slicer_BINARY_DIR}/CMake
${CMAKE_MODULE_PATH}
)
SET(Slicer_CMAKE_DIR "${Slicer_SOURCE_DIR}/CMake" CACHE INTERNAL "")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Additional CXX/C Flags # Additional CXX/C Flags
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
......
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