Skip to content

Fix build issues with CMake 3.10

Kai Pastor requested to merge dg0yt/libtiff:cmake into master

According to CMakeLists.txt, the minimum supported version is cmake 3.9. But configuration in Ubuntu 18.04 (cmake 3.10) failed, due to missing arguments to add_executable() and add_library(). E.g.

You have called ADD_LIBRARY for library tiffxx without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Error at libtiff/CMakeLists.txt:192 (add_executable):
  add_executable called with incorrect number of arguments


CMake Error at libtiff/CMakeLists.txt:193 (target_sources):
  Cannot specify sources for target "mkg3states" which is not built by this
  project.


CMake Error at libtiff/CMakeLists.txt:194 (target_link_libraries):
  Cannot specify link libraries for target "mkg3states" which is not built by
  this project.


-- Configuring incomplete, errors occurred!

To minimize the modifications to the CMake files, this MR adds an empty placeholder file. The commit can be reverted after bumping requirements to cmake 3.11.

In addition there were errors on certain reconfigurations, due to usage of a macro from a module which wasn't explicitly included:

CMake Error at cmake/TypeSizeChecks.cmake:29 (check_type_size):
  Unknown CMake command "check_type_size".
Call Stack (most recent call first):
  CMakeLists.txt:83 (include)

Merge request reports