0

I have a piece of software that relies on a particular version of GEOS and GDAL (ie newer than the one installed on the system). I've installed the particular versions with prefix /opt/hhd. The problem is that there already is both GDAL and GEOS installed, and those get included first.

How can I force CMake to use this location to include headers, instead of /usr/local?

I was trying the BEFORE / AFTER keywords. But that didn't help:

include_directories(
    /opt/hhd/geos/include
    /opt/hhd/gdal/include
...
)

I was also trying -iprefix with above folders.

benjist
  • 2,740
  • 3
  • 31
  • 58
  • Maybe this will help: http://stackoverflow.com/questions/33165270/force-cmake-to-use-the-full-library-path – Sergey Aug 26 '16 at 01:46
  • 2
    Are you using `find_library`/`find_package` for detecting the locations of GEOS and GDAL? If so, use `CMAKE_PREFIX_PATH` on the command line to give the custom locations a higher priority than the system paths. – Torbjörn Aug 26 '16 at 04:56
  • BEFORE / AFTER is the position within the list of includes. – usr1234567 Aug 26 '16 at 07:47

0 Answers0