@ -16,18 +16,17 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif ( )
endif ( )
if ( KICAD_SPICE )
set ( INC_AFTER ${ INC_AFTER } ${ NGSPICE_INCLUDE_DIR } )
# A d d n g s p i c e t o e e s c h e m a
set ( INC_AFTER ${ INC_AFTER } ${ NGSPICE_INCLUDE_DIR } )
# F i n d o u t t h e e x a c t l i b n g s p i c e f i l e n a m e
get_filename_component ( NGSPICE_DLL_ABSPATH "${NGSPICE_DLL}" ABSOLUTE )
get_filename_component ( NGSPICE_DLL_FILE "${NGSPICE_DLL_ABSPATH}" NAME )
# F i n d o u t t h e e x a c t l i b n g s p i c e f i l e n a m e
get_filename_component ( NGSPICE_DLL_ABSPATH "${NGSPICE_DLL}" ABSOLUTE )
get_filename_component ( NGSPICE_DLL_FILE "${NGSPICE_DLL_ABSPATH}" NAME )
set_property ( SOURCE sim/ngspice.cpp
A P P E N D P R O P E R T Y C O M P I L E _ D E F I N I T I O N S
N G S P I C E _ D L L _ F I L E = " $ { N G S P I C E _ D L L _ F I L E } "
)
endif ( )
set_property ( SOURCE sim/ngspice.cpp
A P P E N D P R O P E R T Y C O M P I L E _ D E F I N I T I O N S
N G S P I C E _ D L L _ F I L E = " $ { N G S P I C E _ D L L _ F I L E } "
)
include_directories ( BEFORE ${ INC_BEFORE } )
include_directories (
@ -343,34 +342,33 @@ set( EESCHEMA_COMMON_SRCS
)
if ( KICAD_SPICE )
set ( EESCHEMA_SRCS
$ { E E S C H E M A _ S R C S }
d i a l o g s / d i a l o g _ s i m _ c o m m a n d . c p p
d i a l o g s / d i a l o g _ s i m _ c o m m a n d _ b a s e . c p p
d i a l o g s / d i a l o g _ s i m _ f o r m a t _ v a l u e . c p p
d i a l o g s / d i a l o g _ s i m _ f o r m a t _ v a l u e _ b a s e . c p p
d i a l o g s / d i a l o g _ s i m _ m o d e l . c p p
d i a l o g s / d i a l o g _ s i m _ m o d e l _ b a s e . c p p
d i a l o g s / d i a l o g _ u s e r _ d e f i n e d _ s i g n a l s . c p p
d i a l o g s / d i a l o g _ u s e r _ d e f i n e d _ s i g n a l s _ b a s e . c p p
t o o l s / s i m u l a t o r _ c o n t r o l . c p p
s i m / n g s p i c e _ c i r c u i t _ m o d e l . c p p
s i m / n g s p i c e . c p p
s i m / s i m u l a t o r _ f r a m e . c p p
s i m / s i m u l a t o r _ f r a m e _ b a s e . c p p
s i m / s i m _ p a n e l _ b a s e . c p p
s i m / s i m _ p l o t _ c o l o r s . c p p
s i m / s i m _ p l o t _ p a n e l . c p p
s i m / s i m _ p r o p e r t y . c p p
s i m / s p i c e _ s i m u l a t o r . c p p
s i m / s p i c e _ v a l u e . c p p
s i m / t o o l b a r s _ s i m u l a t o r _ f r a m e . c p p
w i d g e t s / s i m _ n o t e b o o k . c p p
w i d g e t s / t u n e r _ s l i d e r . c p p
w i d g e t s / t u n e r _ s l i d e r _ b a s e . c p p
)
endif ( )
set ( EESCHEMA_SRCS
$ { E E S C H E M A _ S R C S }
d i a l o g s / d i a l o g _ s i m _ c o m m a n d . c p p
d i a l o g s / d i a l o g _ s i m _ c o m m a n d _ b a s e . c p p
d i a l o g s / d i a l o g _ s i m _ f o r m a t _ v a l u e . c p p
d i a l o g s / d i a l o g _ s i m _ f o r m a t _ v a l u e _ b a s e . c p p
d i a l o g s / d i a l o g _ s i m _ m o d e l . c p p
d i a l o g s / d i a l o g _ s i m _ m o d e l _ b a s e . c p p
d i a l o g s / d i a l o g _ u s e r _ d e f i n e d _ s i g n a l s . c p p
d i a l o g s / d i a l o g _ u s e r _ d e f i n e d _ s i g n a l s _ b a s e . c p p
t o o l s / s i m u l a t o r _ c o n t r o l . c p p
s i m / n g s p i c e _ c i r c u i t _ m o d e l . c p p
s i m / n g s p i c e . c p p
s i m / s i m u l a t o r _ f r a m e . c p p
s i m / s i m u l a t o r _ f r a m e _ b a s e . c p p
s i m / s i m _ p a n e l _ b a s e . c p p
s i m / s i m _ p l o t _ c o l o r s . c p p
s i m / s i m _ p l o t _ p a n e l . c p p
s i m / s i m _ p r o p e r t y . c p p
s i m / s p i c e _ s i m u l a t o r . c p p
s i m / s p i c e _ v a l u e . c p p
s i m / t o o l b a r s _ s i m u l a t o r _ f r a m e . c p p
w i d g e t s / s i m _ n o t e b o o k . c p p
w i d g e t s / t u n e r _ s l i d e r . c p p
w i d g e t s / t u n e r _ s l i d e r _ b a s e . c p p
)
if ( WIN32 )
if ( MINGW )
@ -491,24 +489,18 @@ target_link_libraries( eeschema_kiface
s e x p r
B o o s t : : h e a d e r s
$ { w x W i d g e t s _ L I B R A R I E S }
$ { N G S P I C E _ L I B R A R Y }
)
if ( KICAD_SPICE )
target_link_libraries ( eeschema_kiface
P R I V A T E
$ { N G S P I C E _ L I B R A R Y }
if ( MSVC )
# A l l o w f o r MSVC t o d e b u g n g s p i c e f r o m t h e b u i l d d i r e c t o r y
add_custom_command ( TARGET eeschema_kiface POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t " $ { N G S P I C E _ D L L } " " $ < T A R G E T _ F I L E _ D I R : e e s c h e m a _ k i f a c e > "
)
if ( MSVC )
# A l l o w f o r MSVC t o d e b u g n g s p i c e f r o m t h e b u i l d d i r e c t o r y
add_custom_command ( TARGET eeschema_kiface POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ i f _ d i f f e r e n t " $ { N G S P I C E _ D L L } " " $ < T A R G E T _ F I L E _ D I R : e e s c h e m a _ k i f a c e > "
)
add_custom_command ( TARGET eeschema_kiface POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ d i r e c t o r y " $ { N G S P I C E _ C M _ D I R } " " $ < T A R G E T _ F I L E _ D I R : e e s c h e m a _ k i f a c e > / n g s p i c e "
)
endif ( )
add_custom_command ( TARGET eeschema_kiface POST_BUILD
C O M M A N D $ { C M A K E _ C O M M A N D } - E c o p y _ d i r e c t o r y " $ { N G S P I C E _ C M _ D I R } " " $ < T A R G E T _ F I L E _ D I R : e e s c h e m a _ k i f a c e > / n g s p i c e "
)
endif ( )
set_target_properties ( eeschema_kiface PROPERTIES
@ -565,17 +557,15 @@ if( APPLE )
" C O M P O N E N T R u n t i m e
)
if ( KICAD_SPICE )
# b u n d l e l i b n g s p i c e a n d c o d e m o d e l s
get_filename_component ( ABS_LIBNGSPICE ${ NGSPICE_LIBRARY } ABSOLUTE )
get_filename_component ( LIBNGSPICE_PATH ${ ABS_LIBNGSPICE } DIRECTORY )
# b u n d l e l i b n g s p i c e a n d c o d e m o d e l s
get_filename_component ( ABS_LIBNGSPICE ${ NGSPICE_LIBRARY } ABSOLUTE )
get_filename_component ( LIBNGSPICE_PATH ${ ABS_LIBNGSPICE } DIRECTORY )
install ( DIRECTORY "${LIBNGSPICE_PATH}/"
D E S T I N A T I O N " $ { O S X _ B U N D L E _ I N S T A L L _ P L U G I N _ D I R } / s i m "
F I L E S _ M A T C H I N G P A T T E R N " * . d y l i b " )
install ( DIRECTORY "${LIBNGSPICE_PATH}/ngspice"
D E S T I N A T I O N " $ { O S X _ B U N D L E _ I N S T A L L _ P L U G I N _ D I R } / s i m " )
endif ( )
install ( DIRECTORY "${LIBNGSPICE_PATH}/"
D E S T I N A T I O N " $ { O S X _ B U N D L E _ I N S T A L L _ P L U G I N _ D I R } / s i m "
F I L E S _ M A T C H I N G P A T T E R N " * . d y l i b " )
install ( DIRECTORY "${LIBNGSPICE_PATH}/ngspice"
D E S T I N A T I O N " $ { O S X _ B U N D L E _ I N S T A L L _ P L U G I N _ D I R } / s i m " )
else ( )
if ( MSVC )
target_sources ( eeschema_kiface PRIVATE ${ CMAKE_SOURCE_DIR } /resources/msw/eeschema-dll.rc )