diff --git a/CMake/vtkModuleMacros.cmake b/CMake/vtkModuleMacros.cmake index 0acb46bb5af38c3328c721bb03f0ae0b97c5b7ae..d0006ccb3563d0b03fa064cdfe2f98b906a47444 100644 --- a/CMake/vtkModuleMacros.cmake +++ b/CMake/vtkModuleMacros.cmake @@ -517,7 +517,7 @@ endfunction() # rules for the target unless NO_INSTALL argument is specified or # VTK_INSTALL_NO_DEVELOPMENT variable is set. function(vtk_compile_tools_target _name) - if (CMAKE_CROSSCOMPILING) + if (CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) message(AUTHOR_WARNING "vtk_compile_tools_target is being called when CMAKE_CROSSCOMPILING is true. " "This generally signifies a script issue. compile-tools are not expected " diff --git a/CMakeLists.txt b/CMakeLists.txt index a8377f95649b43aed17972b5fa0b361dcaca1c34..057c554c73608798010c5afde32a66e8e65e5f10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,8 +248,9 @@ if(NOT VTK_BUILD_PYTHON_MODULE_DIR) PATH "Directory where python modules will be put inside the build tree") mark_as_advanced(VTK_BUILD_PYTHON_MODULE_DIR) endif() -if (CMAKE_CROSSCOMPILING AND NOT COMPILE_TOOLS_IMPORTED) - # if CMAKE_CROSSCOMPILING is true, we need to import build-tools targets. +if (CMAKE_CROSSCOMPILING AND NOT COMPILE_TOOLS_IMPORTED AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) + # if CMAKE_CROSSCOMPILING is true and CMAKE_CROSSCOMPILING_EMULATOR is not set, we need + # to import build-tools targets. find_package(VTKCompileTools REQUIRED) set (COMPILE_TOOLS_IMPORTED TRUE) endif() diff --git a/Utilities/EncodeString/CMakeLists.txt b/Utilities/EncodeString/CMakeLists.txt index d3d841d2d79e36437f0f753e2017dc94187fbf34..baf9d790a4954b2bcec03218c3a85887cd54ee20 100644 --- a/Utilities/EncodeString/CMakeLists.txt +++ b/Utilities/EncodeString/CMakeLists.txt @@ -10,7 +10,7 @@ set(VTK_BUILD_FORWARDING_EXECUTABLES FALSE) vtk_module_export_info() -IF(NOT CMAKE_CROSSCOMPILING) +IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) VTK_ADD_EXECUTABLE(vtkEncodeString vtkEncodeString.cxx) vtk_compile_tools_target(vtkEncodeString) ENDIF() diff --git a/Utilities/HashSource/CMakeLists.txt b/Utilities/HashSource/CMakeLists.txt index 0dc4b25d2474dc1dad08cca7b3d1f69df2de0eaa..24921c1c079cdd2dea95e38abbbe972fe5f93929 100644 --- a/Utilities/HashSource/CMakeLists.txt +++ b/Utilities/HashSource/CMakeLists.txt @@ -12,7 +12,7 @@ vtk_module_export_info() # launcher for it and should always use the RPATH to find shared libs. SET(CMAKE_SKIP_RPATH 0) -IF(NOT CMAKE_CROSSCOMPILING) +IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) ADD_EXECUTABLE(vtkHashSource vtkHashSource.cxx) TARGET_LINK_LIBRARIES(vtkHashSource vtksys) vtk_compile_tools_target(vtkHashSource) diff --git a/Utilities/ParseOGLExt/CMakeLists.txt b/Utilities/ParseOGLExt/CMakeLists.txt index 2dff57969130f03402a64c0b6bc268cf0ff83a87..31c5f4007d29849cd393fb76e88942ab35de2dfd 100644 --- a/Utilities/ParseOGLExt/CMakeLists.txt +++ b/Utilities/ParseOGLExt/CMakeLists.txt @@ -23,7 +23,7 @@ vtk_module_export_info() -IF(NOT CMAKE_CROSSCOMPILING) +IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) ADD_EXECUTABLE(vtkParseOGLExt Tokenizer.cxx ParseOGLExt.cxx) vtk_compile_tools_target(vtkParseOGLExt) ENDIF()