From Mattias Helsing, "I finally got to fix the cmake Modules that have duplicates in later

version of cmake. See attached submission. I have tested the ones that
I compile myself (GDAL, Freetype, ZLIB) on ubuntu 12.04 with
cmake-2.8.7."
This commit is contained in:
Robert Osfield 2014-04-29 12:19:21 +00:00
parent ecd26f9f5b
commit fa6f5219bf
7 changed files with 59 additions and 0 deletions

View File

@ -9,6 +9,15 @@
# #
# Created by Robert Osfield. # Created by Robert Osfield.
# prefer FindFLTK from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindFLTK.cmake)
include(${CMAKE_ROOT}/Modules/FindFLTK.cmake)
if(FLTK_FOUND)
return()
endif()
endif()
FIND_PATH(FLTK_INCLUDE_DIR Fl/Fl.H Fl/Fl.h FIND_PATH(FLTK_INCLUDE_DIR Fl/Fl.H Fl/Fl.h
$ENV{FLTK_DIR}/include $ENV{FLTK_DIR}/include
$ENV{FLTK_DIR} $ENV{FLTK_DIR}

View File

@ -12,6 +12,15 @@
# used in building FREETYPE. # used in building FREETYPE.
# Created by Eric Wing. # Created by Eric Wing.
# prefer FindFreetype from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindFreetype.cmake)
include(${CMAKE_ROOT}/Modules/FindFreetype.cmake)
if(FREETYPE_FOUND)
return()
endif()
endif()
# Ugh, FreeType seems to use some #include trickery which # Ugh, FreeType seems to use some #include trickery which
# makes this harder than it should be. It looks like they # makes this harder than it should be. It looks like they
# put ft2build.h in a common/easier-to-find location which # put ft2build.h in a common/easier-to-find location which
@ -24,6 +33,7 @@
# wants explicit full paths and this trickery doesn't work too well. # wants explicit full paths and this trickery doesn't work too well.
# I'm going to attempt to cut out the middleman and hope # I'm going to attempt to cut out the middleman and hope
# everything still works. # everything still works.
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
PATHS PATHS
$ENV{FREETYPE_DIR} $ENV{FREETYPE_DIR}

View File

@ -19,6 +19,7 @@
# This makes the presumption that you are include gdal.h like # This makes the presumption that you are include gdal.h like
# #include "gdal.h" # #include "gdal.h"
# prefer FindGDAL from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindGDAL.cmake) if(EXISTS ${CMAKE_ROOT}/Modules/FindGDAL.cmake)
include(${CMAKE_ROOT}/Modules/FindGDAL.cmake) include(${CMAKE_ROOT}/Modules/FindGDAL.cmake)

View File

@ -9,6 +9,15 @@
# #
# Created by Robert Osfield. # Created by Robert Osfield.
# prefer FindJasper from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindJasper.cmake)
include(${CMAKE_ROOT}/Modules/FindJasper.cmake)
if(JASPER_FOUND)
return()
endif()
endif()
FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h
$ENV{JASPER_DIR}/include $ENV{JASPER_DIR}/include
$ENV{JASPER_DIR}/src/libjasper/include $ENV{JASPER_DIR}/src/libjasper/include

View File

@ -17,6 +17,16 @@
# #
# Created by Eric Wing. # Created by Eric Wing.
# prefer FindOpenThreads from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindOpenThreads.cmake)
include(${CMAKE_ROOT}/Modules/FindOpenThreads.cmake)
if(OPENTHREADS_FOUND)
return()
endif()
endif()
# Header files are presumed to be included like # Header files are presumed to be included like
# #include <OpenThreads/Thread> # #include <OpenThreads/Thread>

View File

@ -9,6 +9,16 @@
# #
# Created by Eric Wing. # Created by Eric Wing.
# prefer FindQuickTime from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindQuickTime.cmake)
include(${CMAKE_ROOT}/Modules/FindQuickTime.cmake)
if(QUICKTIME_FOUND)
return()
endif()
endif()
# QuickTime on OS X looks different than QuickTime for Windows, # QuickTime on OS X looks different than QuickTime for Windows,
# so I am going to case the two. # so I am going to case the two.

View File

@ -10,6 +10,16 @@
# #
# Created by Ulrich Hertlein. # Created by Ulrich Hertlein.
# prefer FindZLIB from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindZLIB.cmake)
include(${CMAKE_ROOT}/Modules/FindZLIB.cmake)
if(ZLIB_FOUND)
return()
endif()
endif()
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
$ENV{ZLIB_DIR}/include $ENV{ZLIB_DIR}/include
$ENV{ZLIB_DIR} $ENV{ZLIB_DIR}