--- Modules/Platform/Darwin.cmake +++ Modules/Platform/Darwin.cmake @@ -265,7 +265,9 @@ endforeach() endif() endif() -list(APPEND CMAKE_SYSTEM_PREFIX_PATH - /sw # Fink - /opt/local # MacPorts - ) + +# prepend the MacPorts prefix to CMAKE_SYSTEM_PREFIX_PATH +# might already exist after this if the user has specified it +list(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 + __PREFIX__ +) --- Modules/Platform/UnixPaths.cmake +++ Modules/Platform/UnixPaths.cmake @@ -37,7 +37,7 @@ # synchronized list(APPEND CMAKE_SYSTEM_PREFIX_PATH # Standard - /usr/local /usr / + /usr / ) if(_CMAKE_INSTALL_DIR) list(APPEND CMAKE_SYSTEM_PREFIX_PATH