This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCllenhaupt?= Date: Sat, 22 Jun 2013 18:44:18 +1000 Subject: [PATCH] fix libharu shared linking --- a/IO/Export/CMakeLists.txt 2017-05-19 15:20:47.000000000 +0200 +++ b/IO/Export/CMakeLists.txt 2017-06-05 11:13:51.646391244 +0200 @@ -33,6 +33,16 @@ ABSTRACT ) +if(VTK_BUILD_SHARED_LIBS) + set_source_files_properties( + vtkPDFContextDevice2D.cxx + vtkPDFExporter.cxx + PROPERTIES + COMPILE_DEFINITIONS + HPDF_DLL + ) +endif() + vtk_module_library(vtkIOExport ${Module_SRCS}) include(vtkOpenGL) vtk_opengl_link(vtkIOExport) --- a/CMake/FindLibHaru.cmake 2017-05-19 15:20:47.000000000 +0200 +++ b/VTK-8.0.0.rc1/CMake/FindLibHaru.cmake 2017-06-05 12:56:24.120790922 +0200 @@ -19,7 +19,7 @@ find_path(LIBHARU_INCLUDE_DIR hpdf.h) -find_library(LIBHARU_LIBRARY NAMES hpdf) +find_library(LIBHARU_LIBRARY NAMES hpdf hpdfs) # handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if # all listed variables are TRUE --- a/Rendering/OpenGL2/CMakeLists.txt 2017-05-19 15:20:47.000000000 +0200 +++ b/Rendering/OpenGL2/CMakeLists.txt 2017-06-06 01:11:16.512084625 +0200 @@ -122,6 +122,11 @@ vtkTransformFeedback WRAP_EXCLUDE) +if(NOT VTK_BUILD_SHARED_LIBS) + set_source_files_properties(${Module_SRCS} + PROPERTIES COMPILE_DEFINITIONS GLEW_STATIC) +endif() + set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx vtkOpenGLGL2PSHelper --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,9 +251,9 @@ endif() # Full functional CMAKE_CROSSCOMPILING_EMULATOR support for custom_command and # custom_target is available in CMake 3.8.0 # It was first added in CMake 3.6.0 and later fixed in CMake 3.8.0 (commit e7480d67, CMake issue #16288) -set(_crosscompiling_emulator_support_custom_target 1) -if(CMAKE_VERSION VERSION_LESS 3.8.0) - set(_crosscompiling_emulator_support_custom_target 0) +set(_crosscompiling_emulator_support_custom_target 0) +if(DEFINED CMAKE_CROSSCOMPILING_EMULATOR AND NOT CMAKE_VERSION VERSION_LESS 3.8.0) + set(_crosscompiling_emulator_support_custom_target 1) endif() # Maintain backward compatibility with user setting COMPILE_TOOLS_IMPORTED if(DEFINED COMPILE_TOOLS_IMPORTED AND NOT DEFINED VTK_COMPILE_TOOLS_IMPORTED)