Add CMAKE_PREFIX_PATH to cmake-gui
authorRoland Schulz <roland@utk.edu>
Sat, 17 Nov 2012 20:00:37 +0000 (15:00 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 19 Nov 2012 14:58:38 +0000 (15:58 +0100)
CMAKE_PREFIX_PATH didn't show up in ccmake, because it wasn't in
the cache by default. Given that it is the easiest way to specify
external dependendencies it should show up. Also prior one had to go
to the advanced settings to specify the path to FFTW. Modified
the FFTW message to explain that CMAKE_PREFIX_PATH is also an
option. This makes it possible to set it (if it isn't found
automatically)without having to open the advanced settings.

Change-Id: Ib36ab004aac8f65d2a145d67b72b8c8f4fa065c8

CMakeLists.txt
cmake/FindFFTW.cmake

index b8aa8e05cba31ffdd8eb209df8bbf397e9e34ec7..d0e166a7c4cc933b2b179703c0bce2ac72f659aa 100644 (file)
@@ -113,6 +113,7 @@ mark_as_advanced(GMX_FORCE_CXX)
 if(GMX_GPU OR GMX_OPENMM OR GMX_FORCE_CXX)
     enable_language(CXX)
 endif()
+set(CMAKE_PREFIX_PATH "" CACHE STRING "Extra locations to search for external libraries and tools (give directory without lib, bin, or include)")
 
 ########################################################################
 # Fix stupid flags on Windows
index 4571ed507b73e2a938961c9285fe1449e3a206cb..1384d9e2ed4a593206ef9b0a3e1dc9ca113e743e 100644 (file)
@@ -50,7 +50,7 @@ set(${FFTW}_INCLUDE_DIRS "${${FFTW}_INCLUDE_DIR}")
 if (${FFTW}_LIBRARY AND ${FFTW}_INCLUDE_DIR)
   set(${FFTW}_FOUND TRUE)
 elseif (NOT ${FFTW}_LIBRARY)
-  message("Could not find ${${FFTW}_PKG} library named lib${${FFTW}_PKG}, please specify its location in ${FFTW}_LIBRARY by hand (e.g. -D${FFTW}_LIBRARY='/path/to/lib${${FFTW}_PKG}.so')")
+  message("Could not find ${${FFTW}_PKG} library named lib${${FFTW}_PKG}, please specify its location in CMAKE_PREFIX_PATH or ${FFTW}_LIBRARY by hand (e.g. -D${FFTW}_LIBRARY='/path/to/lib${${FFTW}_PKG}.so')")
 elseif (NOT ${FFTW}_INCLUDE_DIR)
   message("Could not the ${${FFTW}_PKG} header fftw3.h, please specify its path in ${FFTW}_INCLUDE_DIR by hand (e.g. -D${FFTW}_INCLUDE_DIR='/path/to/include')")
 endif()