CMake module for libngspice
This commit is contained in:
parent
6e5628ceaf
commit
497b2a9442
|
@ -502,6 +502,11 @@ if( MINGW AND USE_WX_GRAPHICS_CONTEXT )
|
|||
check_find_package_result( GDI_PLUS_FOUND "GDI+" )
|
||||
endif()
|
||||
|
||||
# Find ngspice library, required for integrated circuit simulator
|
||||
if( KICAD_SPICE )
|
||||
find_package( ngspice REQUIRED )
|
||||
endif()
|
||||
|
||||
# Assist with header file searching optimization:
|
||||
# INC_BEFORE and INC_AFTER are two lists which go at the front and back of the
|
||||
# header file search lists, respectively.
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# CMake script for finding libngspice
|
||||
# (C) CERN 2016
|
||||
# Author: Maciej Suminski <maciej.suminski@cern.ch>
|
||||
|
||||
find_path( NGSPICE_INCLUDE_DIR ngspice/sharedspice.h
|
||||
PATHS ${NGSPICE_INCLUDE_PATH}
|
||||
PATH_SUFFIXES share/ngspice/include
|
||||
)
|
||||
|
||||
find_library( NGSPICE_LIBRARY ngspice
|
||||
PATHS ${NGSPICE_LIBRARY_PATH}
|
||||
)
|
||||
|
||||
include( FindPackageHandleStandardArgs )
|
||||
|
||||
find_package_handle_standard_args( ngspice
|
||||
REQUIRED_VARS
|
||||
NGSPICE_INCLUDE_DIR
|
||||
NGSPICE_LIBRARY
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
NGSPICE_INCLUDE_DIR
|
||||
NGSPICE_LIBRARY
|
||||
)
|
|
@ -1,5 +1,9 @@
|
|||
add_definitions( -DEESCHEMA )
|
||||
|
||||
if( KICAD_SPICE )
|
||||
set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
include_directories( BEFORE ${INC_BEFORE} )
|
||||
include_directories(
|
||||
./dialogs
|
||||
|
@ -195,7 +199,7 @@ set( EESCHEMA_COMMON_SRCS
|
|||
|
||||
|
||||
if( KICAD_SPICE )
|
||||
set( EESCHEMA_SRCS
|
||||
set( EESCHEMA_SRCS
|
||||
${EESCHEMA_SRCS}
|
||||
sim/simulate.cpp
|
||||
sim/sim_plot_frame_base.cpp
|
||||
|
|
|
@ -25,9 +25,10 @@
|
|||
#ifndef NGSPICE_H
|
||||
#define NGSPICE_H
|
||||
|
||||
#include <../share/ngspice/include/ngspice/sharedspice.h>
|
||||
#include "spice_simulator.h"
|
||||
|
||||
#include <ngspice/sharedspice.h>
|
||||
|
||||
class wxDynamicLibrary;
|
||||
|
||||
class NGSPICE : public SPICE_SIMULATOR {
|
||||
|
|
Loading…
Reference in New Issue