From 6e4d6c445c154283448df9b04d7b5ca0af435892 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 15 Aug 2016 14:39:26 +0200 Subject: [PATCH] Add NGSPICE_ROOT_DIR parameter for libngspice CMake script --- CMakeModules/Findngspice.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeModules/Findngspice.cmake b/CMakeModules/Findngspice.cmake index 1b394409a1..adeab918e5 100644 --- a/CMakeModules/Findngspice.cmake +++ b/CMakeModules/Findngspice.cmake @@ -3,12 +3,13 @@ # Author: Maciej Suminski find_path( NGSPICE_INCLUDE_DIR ngspice/sharedspice.h - PATHS ${NGSPICE_INCLUDE_PATH} - PATH_SUFFIXES share/ngspice/include + PATHS ${NGSPICE_ROOT_DIR} $ENV{NGSPICE_ROOT_DIR} ${NGSPICE_INCLUDE_PATH} + PATH_SUFFIXES src/include share/ngspice/include ) find_library( NGSPICE_LIBRARY ngspice - PATHS ${NGSPICE_LIBRARY_PATH} + PATHS ${NGSPICE_ROOT_DIR} $ENV{NGSPICE_ROOT_DIR} ${NGSPICE_LIBRARY_PATH} + PATH_SUFFIXES src/.libs ) include( FindPackageHandleStandardArgs )